Skip to content

Text field height is not compliant with M3 specification #142972

@bleroux

Description

@bleroux

Steps to reproduce

Run the code sample on Android.

Expected results

The TextField height is 56.

Capture d’écran du 2024-02-06 08-13-35

(From https://m3.material.io/components/text-fields/specs#8c032848-e442-46df-b25d-28f1315f234b)

Actual results

The TextField height is 64.

Capture d’écran du 2024-02-06 08-06-13

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(BuildContext context) {
    return MaterialApp(
      home: SafeArea(
        child: Scaffold(
          body: Padding(
            padding: const EdgeInsets.all(16.0),
            child: TextField(
              controller: TextEditingController(text: 'Material3'),
              decoration: const InputDecoration(
                labelText: 'label',
                filled: true,
              ),
            ),
          ),
        ),
      ),
    );
  }
}

Screenshots or Video

No response

Logs

No response

Flutter Doctor output

Doctor output
[✓] Flutter (Channel master, 3.19.0-3.0.pre.496, on Ubuntu 23.04
    6.2.0-39-generic, locale fr_FR.UTF-8)
    • Flutter version 3.19.0-3.0.pre.496 on channel master at
      /home/bruno/Nevercode/flutter
    • Upstream repository [email protected]:NevercodeHQ/flutter.git
    • FLUTTER_GIT_URL = [email protected]:NevercodeHQ/flutter.git
    • Framework revision 0b5cd5073a (il y a 26 heures), 2024-02-05 06:16:23
      +0100
    • Engine revision f34c658b96
    • Dart version 3.4.0 (build 3.4.0-99.0.dev)
    • DevTools version 2.31.0

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
    • Android SDK at /media/oldhome/Android/Sdk
    • Platform android-34, build-tools 33.0.2
    • ANDROID_HOME = /media/oldhome/Android/Sdk
    • Java binary at: /media/oldhome/Produits/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build
      11.0.13+0-b1751.21-8125866)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
    • Ubuntu clang version 15.0.7
    • cmake version 3.25.1
    • ninja version 1.11.1
    • pkg-config version 1.8.1

[✓] Android Studio (version 2021.3)
    • Android Studio at /media/oldhome/Produits/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
      11.0.13+0-b1751.21-8125866)

[✓] VS Code (version 1.86.0)
    • VS Code at /snap/code/current/usr/share/code
    • Flutter extension version 3.82.0

[✓] Connected device (3 available)
    • sdk gphone64 x86 64 (mobile) • emulator-5554 • android-x64    • Android 13
      (API 33) (emulator)
    • Linux (desktop)              • linux         • linux-x64      • Ubuntu
      23.04 6.2.0-39-generic
    • Chrome (web)                 • chrome        • web-javascript • Google
      Chrome 120.0.6099.199

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

• No issues found!```

</details>

Metadata

Metadata

Assignees

Labels

a: text inputEntering text in a text field or keyboard related problemsf: material designflutter/packages/flutter/material repository.found in release: 3.16Found to occur in 3.16found in release: 3.20Found to occur in 3.20frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onr: 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