Skip to content

InputDecoration helper/error end padding is not compliant with M3 spec #175993

@bleroux

Description

@bleroux

Steps to reproduce

  1. Run the code sample
  2. Observe the right padding of the helper/error area (blue rectangle)

Expected results

The right padding is 16 pixels, as per https://m3.material.io/components/text-fields/specs#0c5c8d6d-2169-4d42-960c-51f6ee42eb57

Actual results

The right padding is 8 pixels

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(
      debugShowCheckedModeBanner: false,
      theme: ThemeData.dark(),
      home: Scaffold(
        body: Padding(
          padding: const EdgeInsets.all(8.0),
          child: SizedBox(
            width: 250,
            child: Column(
              spacing: 8,
              children: [
                InputDecorator(
                  decoration: InputDecoration(
                    labelText: 'Label text',
                    helper: Container(color: Colors.blueAccent, height: 16, width: 300),
                    border: const OutlineInputBorder(),
                  ),
                ),
                Row(
                  children: [
                    Container(color: Colors.orange, height: 16, width: 16),
                    const Text('← 16'),
                    const Spacer(),
                    const Text('16 →'),
                    Container(color: Colors.orange, height: 16, width: 16),
                  ],
                ),
              ],
            ),
          ),
        ),
      ),
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[Paste your output here]

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listf: material designflutter/packages/flutter/material repository.found in release: 3.35Found to occur in 3.35found in release: 3.37Found to occur in 3.37frameworkflutter/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 teamtriaged-designTriaged 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