@@ -977,7 +977,8 @@ class PlatformDispatcher {
977977 /// This option is used by [EditableTextState] to define its
978978 /// [SpellCheckConfiguration] when a default spell check service
979979 /// is requested.
980- bool get nativeSpellCheckServiceDefined => configuration.nativeSpellCheckServiceDefined;
980+ bool get nativeSpellCheckServiceDefined => _nativeSpellCheckServiceDefined;
981+ bool _nativeSpellCheckServiceDefined = false ;
981982
982983 /// Whether briefly displaying the characters as you type in obscured text
983984 /// fields is enabled in system settings.
@@ -986,7 +987,8 @@ class PlatformDispatcher {
986987 ///
987988 /// * [EditableText.obscureText] , which when set to true hides the text in
988989 /// the text field.
989- bool get brieflyShowPassword => configuration.brieflyShowPassword;
990+ bool get brieflyShowPassword => _brieflyShowPassword;
991+ bool _brieflyShowPassword = true ;
990992
991993 /// The setting indicating the current brightness mode of the host platform.
992994 /// If the platform has no preference, [platformBrightness] defaults to
@@ -1040,8 +1042,16 @@ class PlatformDispatcher {
10401042 final double textScaleFactor = (data['textScaleFactor' ]! as num ).toDouble ();
10411043 final bool alwaysUse24HourFormat = data['alwaysUse24HourFormat' ]! as bool ;
10421044 final bool ? nativeSpellCheckServiceDefined = data['nativeSpellCheckServiceDefined' ] as bool ? ;
1045+ if (nativeSpellCheckServiceDefined != null ) {
1046+ _nativeSpellCheckServiceDefined = nativeSpellCheckServiceDefined;
1047+ } else {
1048+ _nativeSpellCheckServiceDefined = false ;
1049+ }
10431050 // This field is optional.
10441051 final bool ? brieflyShowPassword = data['brieflyShowPassword' ] as bool ? ;
1052+ if (brieflyShowPassword != null ) {
1053+ _brieflyShowPassword = brieflyShowPassword;
1054+ }
10451055 final Brightness platformBrightness =
10461056 data['platformBrightness' ]! as String == 'dark' ? Brightness .dark : Brightness .light;
10471057 final String ? systemFontFamily = data['systemFontFamily' ] as String ? ;
@@ -1058,8 +1068,6 @@ class PlatformDispatcher {
10581068 _configuration = previousConfiguration.copyWith (
10591069 textScaleFactor: textScaleFactor,
10601070 alwaysUse24HourFormat: alwaysUse24HourFormat,
1061- nativeSpellCheckServiceDefined: nativeSpellCheckServiceDefined ?? false ,
1062- brieflyShowPassword: brieflyShowPassword,
10631071 platformBrightness: platformBrightness,
10641072 systemFontFamily: systemFontFamily,
10651073 );
@@ -1247,8 +1255,6 @@ class PlatformConfiguration {
12471255 this .semanticsEnabled = false ,
12481256 this .platformBrightness = Brightness .light,
12491257 this .textScaleFactor = 1.0 ,
1250- this .nativeSpellCheckServiceDefined = false ,
1251- this .brieflyShowPassword = true ,
12521258 this .locales = const < Locale > [],
12531259 this .defaultRouteName,
12541260 this .systemFontFamily,
@@ -1261,8 +1267,6 @@ class PlatformConfiguration {
12611267 bool ? semanticsEnabled,
12621268 Brightness ? platformBrightness,
12631269 double ? textScaleFactor,
1264- bool ? nativeSpellCheckServiceDefined,
1265- bool ? brieflyShowPassword,
12661270 List <Locale >? locales,
12671271 String ? defaultRouteName,
12681272 String ? systemFontFamily,
@@ -1273,8 +1277,6 @@ class PlatformConfiguration {
12731277 semanticsEnabled: semanticsEnabled ?? this .semanticsEnabled,
12741278 platformBrightness: platformBrightness ?? this .platformBrightness,
12751279 textScaleFactor: textScaleFactor ?? this .textScaleFactor,
1276- nativeSpellCheckServiceDefined: nativeSpellCheckServiceDefined ?? this .nativeSpellCheckServiceDefined,
1277- brieflyShowPassword: brieflyShowPassword ?? this .brieflyShowPassword,
12781280 locales: locales ?? this .locales,
12791281 defaultRouteName: defaultRouteName ?? this .defaultRouteName,
12801282 systemFontFamily: systemFontFamily ?? this .systemFontFamily,
@@ -1300,22 +1302,6 @@ class PlatformConfiguration {
13001302 /// The system-reported text scale.
13011303 final double textScaleFactor;
13021304
1303- /// Whether the spell check service is supported on the current platform.
1304- ///
1305- /// This option is used by [EditableTextState] to define its
1306- /// [SpellCheckConfiguration] when a default spell check service
1307- /// is requested.
1308- final bool nativeSpellCheckServiceDefined;
1309-
1310- /// Whether briefly displaying the characters as you type in obscured text
1311- /// fields is enabled in system settings.
1312- ///
1313- /// See also:
1314- ///
1315- /// * [EditableText.obscureText] , which when set to true hides the text in
1316- /// the text field.
1317- final bool brieflyShowPassword;
1318-
13191305 /// The full system-reported supported locales of the device.
13201306 final List <Locale > locales;
13211307
0 commit comments