Skip to content

TextField helper text top padding should be 4.0 on Material3 #144984

@bleroux

Description

@bleroux

Steps to reproduce

  1. Run the code sample
  2. Observe that the gap between the text field container and the helper text is too large (it is 8.0 instead of 4.0).

Expected results

From the M3 specification:
image

See https://m3.material.io/components/text-fields/specs#0c5c8d6d-2169-4d42-960c-51f6ee42eb57

Actual results

image

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: ''),
              decoration: InputDecoration(
                labelText: 'label',
                helperText: 'helper',
                filled: true,
                helperStyle: TextStyle(backgroundColor: Colors.amber[700]),
              ),
            ),
          ),
        ),
      ),
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

No error

Flutter Doctor output

Doctor output
[✓] Flutter (Channel master, 3.19.0-3.0.pre.1083, on Ubuntu 23.10 6.5.0-25-generic, locale fr_FR.UTF-8)
    • Flutter version 3.19.0-3.0.pre.1083 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 1ca88730a0 (il y a 9 heures), 2024-03-11 18:31:25 -0700
    • Engine revision 6745955bb4
    • Dart version 3.4.0 (build 3.4.0-220.0.dev)
    • DevTools version 2.33.1

[✓] 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 16.0.6 (15)
    • cmake version 3.27.4
    • 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.87.1)
    • VS Code at /snap/code/current/usr/share/code
    • Flutter extension version 3.84.0

[✓] Connected device (2 available)
    • Linux (desktop) • linux  • linux-x64      • Ubuntu 23.10 6.5.0-25-generic
    • Chrome (web)    • chrome • web-javascript • Google Chrome 122.0.6261.111

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

• No issues found!

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work lista: text inputEntering text in a text field or keyboard related problemsf: material designflutter/packages/flutter/material repository.found in release: 3.19Found to occur in 3.19found in release: 3.21Found to occur in 3.21frameworkflutter/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-text-inputOwned by Text Input team

Type

No type

Projects

Status

Done (PR merged)

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions