Skip to content

Hint text should disappear instead of fade out #20283

Description

@jklint-g

The InputDecorator has an AnimatedOpacity transition for hiding/showing the hint text https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/material/input_decorator.dart#L1695

However, the hint text should disappear/appear immediately upon the user entering or clearing text (or maybe make this animation configurable/optional?).

The overlapping of the hint text and the newly-entered text during the fade is a little disorienting. Compare this with native apps like Gmail or Tasks or Maps, where the hint text cuts instantly instead of fading.

Activity

  1. added
    frameworkflutter/packages/flutter repository. See also f: labels.
    p: material_uimaterial_ui package in flutter/packages
    on Aug 23, 2018
  2. added this to the milestone on Aug 23, 2018
  3. zoechi commented on Jan 31, 2019

    @zoechi
    Contributor

    ezgif com-video-to-gif

    [✓] Flutter (Channel master, v1.1.10-pre.205, on Mac OS X 10.14.3 18D42, locale en-AT)
    
    import 'package:flutter/material.dart';
    import 'package:flutter/scheduler.dart';
    
    void main() {
    //  timeDilation = 5;
      runApp(MyApp());
    }
    
    class MyApp extends StatelessWidget {
      @override
      Widget build(BuildContext context) {
        return MaterialApp(
          title: 'Flutter Demo',
          theme: ThemeData(
            primarySwatch: Colors.blue,
          ),
          home: MyHomePage(title: 'Flutter Demo Home Page'),
        );
      }
    }
    
    class MyHomePage extends StatefulWidget {
      MyHomePage({Key key, this.title}) : super(key: key);
    
      final String title;
    
      @override
      _MyHomePageState createState() => _MyHomePageState();
    }
    
    class _MyHomePageState extends State<MyHomePage> {
      final _controller = TextEditingController();
    
      @override
      void initState() {
        super.initState();
        Future.delayed(
            const Duration(milliseconds: 2000), () => _controller.text = 'bar foo');
      }
    
      @override
      Widget build(BuildContext context) {
        return Scaffold(
          body: Center(
            child: Column(
              mainAxisAlignment: MainAxisAlignment.center,
              children: <Widget>[
                Text(
                  'foo text',
                ),
                TextField(
                  controller: _controller,
                  decoration: InputDecoration(hintText: 'foo bar'),
                ),
              ],
            ),
          ),
        );
      }
    }
  4. TahaTesser commented on Apr 9, 2020

    @TahaTesser
    Contributor

    Issue still exist

    flutter doctor -v
    [✓] Flutter (Channel dev, v1.18.0, on Mac OS X 10.15.4 19E266, locale en-GB)
        • Flutter version 1.18.0 at /Users/taha/Code/flutter_dev
        • Framework revision 8f7327f83a (2 days ago), 2020-04-06 22:11:01 -0400
        • Engine revision 49891e0653
        • Dart version 2.8.0 (build 2.8.0-dev.20.0 1210d27678)
     
    [✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
        • Android SDK at /Users/taha/Code/sdk
        • Platform android-29, build-tools 29.0.3
        • ANDROID_HOME = /Users/taha/Code/sdk
        • Java binary at: /Applications/Android
          Studio.app/Contents/jre/jdk/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build
          1.8.0_212-release-1586-b4-5784211)
        • All Android licenses accepted.
    [✓] Xcode - develop for iOS and macOS (Xcode 11.4)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Xcode 11.4, Build version 11E146
        • CocoaPods version 1.9.1
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    [✓] Android Studio (version 3.6)
        • Android Studio at /Applications/Android Studio.app/Contents
        • Flutter plugin version 45.0.1
        • Dart plugin version 192.7761
        • Java version OpenJDK Runtime Environment (build
          1.8.0_212-release-1586-b4-5784211)
    [✓] VS Code (version 1.44.0)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.9.1
    [✓] Connected device (3 available)
        • macOS      • macOS      • darwin-x64     • Mac OS X 10.15.4 19E266
        • Chrome     • chrome     • web-javascript • Google Chrome 81.0.4044.92
        • Web Server • web-server • web-javascript • Flutter Tools
    • No issues found!
    taha@Tahas-MacBook-Pro AndroidStudioProjects % flutterd doctor -v
    [✓] Flutter (Channel dev, v1.18.0, on Mac OS X 10.15.4 19E266, locale en-GB)
        • Flutter version 1.18.0 at /Users/taha/Code/flutter_dev
        • Framework revision 8f7327f83a (2 days ago), 2020-04-06 22:11:01 -0400
        • Engine revision 49891e0653
        • Dart version 2.8.0 (build 2.8.0-dev.20.0 1210d27678)
     
    [✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
        • Android SDK at /Users/taha/Code/sdk
        • Platform android-29, build-tools 29.0.3
        • ANDROID_HOME = /Users/taha/Code/sdk
        • Java binary at: /Applications/Android
          Studio.app/Contents/jre/jdk/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build
          1.8.0_212-release-1586-b4-5784211)
        • All Android licenses accepted.
    [✓] Xcode - develop for iOS and macOS (Xcode 11.4)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Xcode 11.4, Build version 11E146
        • CocoaPods version 1.9.1
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    [✓] Android Studio (version 3.6)
        • Android Studio at /Applications/Android Studio.app/Contents
        • Flutter plugin version 45.0.1
        • Dart plugin version 192.7761
        • Java version OpenJDK Runtime Environment (build
          1.8.0_212-release-1586-b4-5784211)
    [✓] VS Code (version 1.44.0)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.9.1
    [✓] Connected device (5 available)
        • SM M305F      • 32003c30dc19668f          • android-arm64  • Android 10
          (API 29)
        • Taha’s iPhone • 00008020-001059882212002E • ios            • iOS 13.4.1
        • macOS         • macOS                     • darwin-x64     • Mac OS X
          10.15.4 19E266
        • Chrome        • chrome                    • web-javascript • Google Chrome
          81.0.4044.92
        • Web Server    • web-server                • web-javascript • Flutter Tools
    • No issues found!
    
  5. added
    P2Important issues not at the top of the work list
    on May 29, 2020
  6. removed this from the milestone on Aug 17, 2020
  7. TahaTesser commented on Dec 29, 2020

    @TahaTesser
    Contributor
    flutter doctor -v
    [✓] Flutter (Channel stable, 1.22.5, on macOS 11.1 20C69 darwin-x64, locale en-GB)
        • Flutter version 1.22.5 at /Users/tahatesser/Code/flutter_stable
        • Framework revision 7891006299 (3 weeks ago), 2020-12-10 11:54:40 -0800
        • Engine revision ae90085a84
        • Dart version 2.10.4
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
        • Android SDK at /Volumes/Extreme/sdk
        • Platform android-30, build-tools 30.0.3
        • ANDROID_HOME = /Volumes/Extreme/sdk
        • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 12.3)
        • Xcode at /Volumes/Extreme/Xcode.app/Contents/Developer
        • Xcode 12.3, Build version 12C33
        • CocoaPods version 1.10.0
    
    [!] Android Studio (version 4.1)
        • Android Studio at /Applications/Android Studio.app/Contents
        ✗ Flutter plugin not installed; this adds Flutter specific functionality.
        ✗ Dart plugin not installed; this adds Dart specific functionality.
        • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    
    [✓] VS Code (version 1.52.1)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.18.0
    
    [✓] Connected device (3 available)
        • RMX2001 (mobile)     • EUYTFEUSQSRGDA6D                     • android-arm64 • Android 10 (API 29)
        • Taha’s iPad (mobile) • 00008020-000255113EE8402E            • ios           • iOS 14.3
        • iPhone 12 (mobile)   • 12D8FF8E-2815-436E-9951-B8A6A42E4ACF • ios           • com.apple.CoreSimulator.SimRuntime.iOS-14-3 (simulator)
    
    ! Doctor found issues in 1 category.
    [✓] Flutter (Channel master, 1.26.0-2.0.pre.145, on macOS 11.1 20C69 darwin-x64, locale en-GB)
        • Flutter version 1.26.0-2.0.pre.145 at /Users/tahatesser/Code/flutter_master
        • Framework revision 38fe7e2b1c (12 hours ago), 2020-12-28 21:39:03 -0500
        • Engine revision 892034dc6a
        • Dart version 2.12.0 (build 2.12.0-179.0.dev)
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
        • Android SDK at /Volumes/Extreme/sdk
        • Platform android-30, build-tools 30.0.3
        • ANDROID_HOME = /Volumes/Extreme/sdk
        • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 12.3)
        • Xcode at /Volumes/Extreme/Xcode.app/Contents/Developer
        • Xcode 12.3, Build version 12C33
        • CocoaPods version 1.10.0
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] Android Studio (version 4.1)
        • Android Studio at /Applications/Android Studio.app/Contents
        • Flutter plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/6351-dart
        • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    
    [✓] VS Code (version 1.52.1)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.18.0
    
    [✓] Connected device (5 available)
        • RMX2001 (mobile)     • EUYTFEUSQSRGDA6D                     • android-arm64  • Android 10 (API 29)
        • Taha’s iPad (mobile) • 00008020-000255113EE8402E            • ios            • iOS 14.3
        • iPhone 12 (mobile)   • 12D8FF8E-2815-436E-9951-B8A6A42E4ACF • ios            • com.apple.CoreSimulator.SimRuntime.iOS-14-3 (simulator)
        • macOS (desktop)      • macos                                • darwin-x64     • macOS 11.1 20C69 darwin-x64
        • Chrome (web)         • chrome                               • web-javascript • Google Chrome 87.0.4280.88
    
    • No issues found!
  8. 28 remaining items

  9. removed
    ⏳Bot is counting down the days until it unassigns the issue
    on Sep 16, 2023
  10. moved this from To do to In progress in Nevercodeon Sep 20, 2023
  11. moved this from In progress to PR submitted in Nevercodeon Sep 21, 2023
  12. moved this from PR submitted to Done (PR merged) in Nevercodeon Sep 21, 2023
  13. added
    r: fixedIssue is closed as already fixed in a newer version
    on Sep 21, 2023
  14. github-actions commented on Oct 5, 2023

    @github-actions

    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.

  15. locked as resolved and limited conversation to collaborators on Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work lista: fidelityMatching the OEM platforms bettera: qualityA truly polished experiencec: new featureNothing broken; request for a new capabilityfound in release: 2.5Found to occur in 2.5found in release: 2.6Found to occur in 2.6frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: material_uimaterial_ui package in flutter/packagesr: fixedIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages team

Type

No type

Projects

  • Status
    Done (PR merged)

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions