Skip to content

Material UI: Visual bug with decorated TextFields and label animations #153387

Description

@voloder

Steps to reproduce

  1. Create a TextInput widget with an OutlineInputBorder that has a circular border with a high radius, and a non-null label
  2. Click on the TextInput

Expected results

The label animates to the corner without interfering with the outline border

Actual results

During the label animation the outline border appears straight instead of rounded during the duration of the animation. Better explained in the GIF that I've attached, and best reproduced with slow animations.

Code sample

Code sample
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(context) {
    return MaterialApp(
      title: "Flutter Demo",
      home: Scaffold(
          body: Container(
        padding: const EdgeInsets.all(20),
        width: 300,
        child: TextField(
          decoration: InputDecoration(
            border: OutlineInputBorder(
              borderRadius: BorderRadius.circular(50),
            ),
            label: const Text("Enter text"),
          ),
        ),
      )),
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration

Animation

Logs

Logs

Flutter Doctor output

Doctor output
    ! Warning: `dart` on your path resolves to C:\Users\Ado\fvm\versions\stable\bin\dart, which is not inside your current Flutter SDK checkout at C:\Users\Ado\fvm\default.        
      Consider adding C:\Users\Ado\fvm\default\bin to the front of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision b0850beeb2 (4 weeks ago), 2024-07-16 21:43:41 -0700
    • Engine revision 235db911ba
    • Dart version 3.4.4
    • DevTools version 2.34.3
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
    • Android SDK at C:\Users\Ado\AppData\Local\Android\sdk
    • Platform android-35, build-tools 35.0.0
    • Java binary at: C:\Users\Ado\AppData\Local\Programs\Android Studio\jbr\bin\java
    • Java version OpenJDK Runtime Environment (build 17.0.11+0--11852314)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.10.5)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.10.35122.118
    • Windows 10 SDK version 10.0.22621.0

[√] Android Studio (version 2024.1)
    • Android Studio at C:\Users\Ado\AppData\Local\Programs\Android Studio
    • 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 17.0.11+0--11852314)

[√] IntelliJ IDEA Community Edition (version 2024.1)
    • IntelliJ at C:\Users\Ado\AppData\Local\Programs\IntelliJ IDEA Community Edition
    • Flutter plugin version 80.0.2
    • Dart plugin version 241.18808

[√] VS Code (version 1.92.0)
    • VS Code at C:\Users\Ado\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension can be installed from:
       https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.22631.3880]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 127.0.6533.99
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 127.0.2651.74

[√] Network resources
    • All expected network resources are available.

Activity

  1. voloder commented on Aug 13, 2024

    @voloder
    Author

    Fixed in #153398

  2. danagbemava-nc commented on Aug 14, 2024

    @danagbemava-nc
    Member

    Reproducible using the code sample provided above.

    flutter doctor -v
    [!] Flutter (Channel stable, 3.24.0, on macOS 14.5 23F79 darwin-arm64, locale en-GB)
        • Flutter version 3.24.0 on channel stable at /Users/nexus/dev/sdks/flutter
        ! Warning: `flutter` on your path resolves to /Users/nexus/dev/sdks/flutters/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/nexus/dev/sdks/flutter. Consider adding /Users/nexus/dev/sdks/flutter/bin to the front of your path.
        ! Warning: `dart` on your path resolves to /Users/nexus/dev/sdks/flutters/bin/dart, which is not inside your current Flutter SDK checkout at /Users/nexus/dev/sdks/flutter. Consider adding /Users/nexus/dev/sdks/flutter/bin to the front of your path.
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision 80c2e84975 (2 weeks ago), 2024-07-30 23:06:49 +0700
        • Engine revision b8800d88be
        • Dart version 3.5.0
        • DevTools version 2.37.2
        • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.
    
    [✓] Flutter (Channel master, 3.24.0-1.0.pre.575, on macOS 14.5 23F79 darwin-arm64, locale en-GB)
        • Flutter version 3.24.0-1.0.pre.575 on channel master at /Users/nexus/dev/sdks/flutters
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision 593729165d (7 hours ago), 2024-08-14 09:13:34 +0800
        • Engine revision 019f9e3f07
        • Dart version 3.6.0 (build 3.6.0-146.0.dev)
        • DevTools version 2.38.0
    ```
    </details>
    
  3. added
    a: text inputEntering text in a text field or keyboard related problems
    frameworkflutter/packages/flutter repository. See also f: labels.
    a: qualityA truly polished experience
    has reproducible stepsThe issue has been confirmed reproducible and is ready to work on
    team-designOwned by Design Languages team
    p: material_uimaterial_ui package in flutter/packages
    and removed
    in triagePresently being triaged by the triage team
    on Aug 14, 2024
  4. added
    P2Important issues not at the top of the work list
    on Aug 15, 2024
  5. Piinks commented on Sep 4, 2024

    @Piinks
    Contributor

    A PR (#153398) was filed to address this, but was not able to finish. If someone else would like to work on this, starting there would be a head start!

  6. added
    has partial patchThere is a PR awaiting someone to take it across the finish line
    on Sep 4, 2024
  7. added
    packageflutter/packages repository. See also p: labels.
    and removed
    frameworkflutter/packages/flutter repository. See also f: labels.
    on Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: animationAnimation APIsa: qualityA truly polished experiencea: text inputEntering text in a text field or keyboard related problemsfound in release: 3.24Found to occur in 3.24has partial patchThere is a PR awaiting someone to take it across the finish linehas reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: material_uimaterial_ui package in flutter/packagespackageflutter/packages repository. See also p: labels.team-text-inputOwned by Text Input teamtriaged-text-inputTriaged by Text Input teamwaiting for PR to land (fixed)A fix is in flight

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions