-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Open
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsa: typographyText rendering, possibly libtxtText rendering, possibly libtxtf: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.found in release: 3.3Found to occur in 3.3Found to occur in 3.3found in release: 3.6Found to occur in 3.6Found to occur in 3.6frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onteam-text-inputOwned by Text Input teamOwned by Text Input teamtriaged-text-inputTriaged by Text Input teamTriaged by Text Input team
Description
Steps to Reproduce
-
Create a
TextFieldthat hasenabled: falseand hasdecoration: InputDecoration(). -
Code of the sample app:
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) => MaterialApp(
title: 'Flutter Demo',
home: MyHomePage(),
);
}
class MyHomePage extends StatelessWidget {
@override
Widget build(BuildContext context) => Scaffold(
body: Center(
child: Padding(
padding: EdgeInsets.all(16),
child: Column(mainAxisAlignment: MainAxisAlignment.center, children: [
Container(
color: Colors.green.withOpacity(0.4),
child: TextField(
enabled: false,
decoration: InputDecoration(
hintText: 'hintText',
),
),
),
SizedBox(height: 8),
Container(
color: Colors.orange.withOpacity(0.4),
child: TextField(
enabled: false,
decoration: InputDecoration(hintText: 'hintText', errorText: 'Error text'),
),
),
SizedBox(height: 8),
Container(
color: Colors.red.withOpacity(0.4),
child: TextField(
decoration: InputDecoration(hintText: 'hintText', errorText: 'Error text'),
),
),
]),
),
), // This trailing comma makes auto-formatting nicer for build methods.
);
}Expected results:
To my mind, TextField should not allocate the space if it is disabled or it should still display the errorText;
Actual results:
At the moment it allocates the space but does not show the error itself;
Example image:
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsa: typographyText rendering, possibly libtxtText rendering, possibly libtxtf: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.found in release: 3.3Found to occur in 3.3Found to occur in 3.3found in release: 3.6Found to occur in 3.6Found to occur in 3.6frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onteam-text-inputOwned by Text Input teamOwned by Text Input teamtriaged-text-inputTriaged by Text Input teamTriaged by Text Input team
