From ff4ba0b8103b08d044ae9bd71d4b38c73679304a Mon Sep 17 00:00:00 2001 From: guidezpl <6655696+guidezpl@users.noreply.github.com> Date: Mon, 25 Apr 2022 11:33:09 +0200 Subject: [PATCH] Update text-field-material-localizations.md --- .../text-field-material-localizations.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/release/breaking-changes/text-field-material-localizations.md b/src/release/breaking-changes/text-field-material-localizations.md index 9de0c7360b..ad50e0ffc4 100644 --- a/src/release/breaking-changes/text-field-material-localizations.md +++ b/src/release/breaking-changes/text-field-material-localizations.md @@ -49,7 +49,9 @@ class Foo extends StatelessWidget { data: const MediaQueryData(), child: Directionality( textDirection: TextDirection.ltr, - child: TextField(), + child: Material( + child: TextField(), + ), ), ); } @@ -67,7 +69,9 @@ class Foo extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( - home: TextField(), + home: Material( + child: TextField(), + ), ); } } @@ -85,7 +89,7 @@ class Foo extends StatelessWidget { Widget build(BuildContext context) { return Localizations( locale: const Locale('en', 'US'), - delegates: >[ + delegates: const >[ DefaultWidgetsLocalizations.delegate, DefaultMaterialLocalizations.delegate, ], @@ -93,7 +97,9 @@ class Foo extends StatelessWidget { data: const MediaQueryData(), child: Directionality( textDirection: TextDirection.ltr, - child: TextField(), + child: Material( + child: TextField(), + ), ), ), );