Updated InputDecoratorExamples for M3 (#128065)
This commit is contained in:
@@ -14,6 +14,7 @@ class InputDecorationExampleApp extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
theme: ThemeData(useMaterial3: true),
|
||||
home: Scaffold(
|
||||
appBar: AppBar(title: const Text('InputDecoration Sample')),
|
||||
body: const InputDecorationExample(),
|
||||
|
||||
@@ -14,6 +14,7 @@ class InputDecorationExampleApp extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
theme: ThemeData(useMaterial3: true),
|
||||
home: Scaffold(
|
||||
appBar: AppBar(title: const Text('InputDecoration Sample')),
|
||||
body: const InputDecorationExample(),
|
||||
|
||||
@@ -14,6 +14,7 @@ class InputDecorationExampleApp extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
theme: ThemeData(useMaterial3: true),
|
||||
home: Scaffold(
|
||||
appBar: AppBar(title: const Text('InputDecoration Sample')),
|
||||
body: const InputDecorationExample(),
|
||||
|
||||
@@ -14,6 +14,7 @@ class InputDecorationExampleApp extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
theme: ThemeData(useMaterial3: true),
|
||||
home: Scaffold(
|
||||
appBar: AppBar(title: const Text('InputDecoration Sample')),
|
||||
body: const InputDecorationExample(),
|
||||
|
||||
@@ -14,6 +14,7 @@ class FloatingLabelStyleErrorExampleApp extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
theme: ThemeData(useMaterial3: true),
|
||||
home: Scaffold(
|
||||
appBar: AppBar(title: const Text('InputDecorator Sample')),
|
||||
body: const Center(
|
||||
|
||||
@@ -14,6 +14,7 @@ class LabelExampleApp extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
theme: ThemeData(useMaterial3: true),
|
||||
home: Scaffold(
|
||||
appBar: AppBar(title: const Text('InputDecoration.label Sample')),
|
||||
body: const LabelExample(),
|
||||
|
||||
@@ -14,6 +14,7 @@ class LabelStyleErrorExampleApp extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
theme: ThemeData(useMaterial3: true),
|
||||
home: Scaffold(
|
||||
appBar: AppBar(title: const Text('InputDecorator Sample')),
|
||||
body: const Center(
|
||||
|
||||
@@ -14,6 +14,7 @@ class MaterialStateExampleApp extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
theme: ThemeData(useMaterial3: true),
|
||||
home: Scaffold(
|
||||
appBar: AppBar(title: const Text('InputDecoration Sample')),
|
||||
body: const MaterialStateExample(),
|
||||
|
||||
@@ -14,6 +14,7 @@ class MaterialStateExampleApp extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
theme: ThemeData(useMaterial3: true),
|
||||
home: Scaffold(
|
||||
appBar: AppBar(title: const Text('InputDecoration Sample')),
|
||||
body: const MaterialStateExample(),
|
||||
|
||||
@@ -13,8 +13,9 @@ class PrefixIconExampleApp extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const MaterialApp(
|
||||
home: Scaffold(body: InputDecoratorExample()),
|
||||
return MaterialApp(
|
||||
theme: ThemeData(useMaterial3: true),
|
||||
home: const Scaffold(body: InputDecoratorExample()),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ class PrefixIconConstraintsExampleApp extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
theme: ThemeData(useMaterial3: true),
|
||||
home: Scaffold(
|
||||
appBar: AppBar(title: const Text('InputDecoration Sample')),
|
||||
body: const PrefixIconConstraintsExample(),
|
||||
|
||||
@@ -13,8 +13,9 @@ class SuffixIconExampleApp extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const MaterialApp(
|
||||
home: Scaffold(body: InputDecoratorExample()),
|
||||
return MaterialApp(
|
||||
theme: ThemeData(useMaterial3: true),
|
||||
home: const Scaffold(body: InputDecoratorExample()),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ class SuffixIconConstraintsExampleApp extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
theme: ThemeData(useMaterial3: true),
|
||||
home: Scaffold(
|
||||
appBar: AppBar(title: const Text('InputDecoration Sample')),
|
||||
body: const SuffixIconConstraintsExample(),
|
||||
|
||||
@@ -11,6 +11,6 @@ void main() {
|
||||
await tester.pumpWidget(
|
||||
const example.PrefixIconExampleApp(),
|
||||
);
|
||||
expect(tester.getCenter(find.byIcon(Icons.person)).dy, 28.0);
|
||||
expect(tester.getCenter(find.byIcon(Icons.person)).dy, 32.0);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -11,6 +11,6 @@ void main() {
|
||||
await tester.pumpWidget(
|
||||
const example.SuffixIconExampleApp(),
|
||||
);
|
||||
expect(tester.getCenter(find.byIcon(Icons.remove_red_eye)).dy, 28.0);
|
||||
expect(tester.getCenter(find.byIcon(Icons.remove_red_eye)).dy, 32.0);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user