Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draggable : text from feedback widget appears red and underlined with a yellow stroke #9304

Closed
rxlabz opened this issue Apr 9, 2017 · 5 comments

Comments

@rxlabz
Copy link
Contributor

rxlabz commented Apr 9, 2017

Steps to Reproduce

When I use a Draggable widget and set a feedback widget containing a Text, the text appears underlined "with a yellow double stroke"

void main() {
  runApp(new MaterialApp(
      home: new Scaffold(
          body: new Stack(children: [
    new Draggable(
        childWhenDragging:
            getBoxed(new Text('Child when dragged')),
        child: new Container(
            width: 200.0,
            height: 200.0,
            color: Colors.red,
            child: new Center(
              child: new Text("drag me"),
            )),
        feedback: getBoxed(
          new Text(
            'feedback',
            style: new TextStyle(fontSize: 14.0, color: Colors.black54),
          ),
          color: Colors.cyan,
        ))
  ]))));
}

Widget getBoxed(Widget child,
        {Color color}) =>
    new Container(
      width: 200.0,
      height: 200.0,
      color: color ?? Colors.grey.shade400,
      child: new Center(child: child),
    );

screenshot

Flutter Doctor

[✓] Flutter (on Mac OS X 10.12.3 16D32, channel master)
• Flutter at /Users/rxlabz/dev/tools/flutter
• Framework revision 9350f28 (33 hours ago), 2017-04-08 00:32:02 -0700
• Engine revision 5d9a642
• Tools Dart version 1.23.0-dev.11.6

[✓] Host Executable Compatibility
• Downloaded executables execute on host

[✓] Android toolchain - develop for Android devices (Android SDK 25.0.2)
• Android SDK at /Users/rxlabz/Library/Android/sdk
• Platform android-25, build-tools 25.0.2
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version: OpenJDK Runtime Environment (build 1.8.0_112-release-b06)

[✓] iOS toolchain - develop for iOS devices (Xcode 8.2.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 8.2.1, Build version 8C1002
• ios-deploy 1.9.1
• CocoaPods version 1.2.0

[✓] Android Studio (version 2.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Gradle version 3.2
• Java version: OpenJDK Runtime Environment (build 1.8.0_112-release-b06)

[✓] IntelliJ IDEA Ultimate Edition (version 2016.3.6)
• Dart plugin version 163.13137
• Flutter plugin version 12.0

[✓] IntelliJ IDEA Ultimate Edition (version 2017.1)
• Dart plugin version 171.4006
• Flutter plugin version 12.1

[-] WebStorm (version 2017.1)
• Flutter plugin not installed; this adds Flutter specific functionality.
• For information about managing plugins, see
https://www.jetbrains.com/help/idea/managing-plugins.html

[✓] Connected devices
• A3 A40 • 622004271815 • android-arm • Android 6.0 (API 23)

@rxlabz rxlabz changed the title Draggable feedback : strange yellow underline the feedback text Draggable : text from feedback widget are underlined with a yellow stroke Apr 9, 2017
@rxlabz rxlabz changed the title Draggable : text from feedback widget are underlined with a yellow stroke Draggable : text from feedback widget appears red and underlined with a yellow stroke Apr 9, 2017
@rxlabz
Copy link
Contributor Author

rxlabz commented Apr 9, 2017

If I don't set a color to the feedback Text, he appears red.

@rxlabz
Copy link
Contributor Author

rxlabz commented Apr 9, 2017

It's just kind of a default settings.

@rxlabz rxlabz closed this as completed Apr 9, 2017
@eduardkieser
Copy link

Wrapping feedback widget with Material Widget seems to solve the problem for me,
however I doubt that this is the best solution though... More info at https://stackoverflow.com/questions/47114639/yellow-lines-under-text-widgets-in-flutter
Draggable( data: data, child: Container(...) feedback: Material( child: Container(...) ) )

@gogreen42
Copy link

gogreen42 commented Apr 9, 2020

You can solve this error with texts property decoration: TextDecoration.none,

Text("My Text",
style: TextStyle(
decoration: TextDecoration.none,
)
);

@lock
Copy link

lock bot commented Apr 25, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@lock lock bot locked and limited conversation to collaborators Apr 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants