@@ -977,7 +977,8 @@ class PlatformDispatcher {
977
977
/// This option is used by [EditableTextState] to define its
978
978
/// [SpellCheckConfiguration] when a default spell check service
979
979
/// is requested.
980
- bool get nativeSpellCheckServiceDefined => configuration.nativeSpellCheckServiceDefined;
980
+ bool get nativeSpellCheckServiceDefined => _nativeSpellCheckServiceDefined;
981
+ bool _nativeSpellCheckServiceDefined = false ;
981
982
982
983
/// Whether briefly displaying the characters as you type in obscured text
983
984
/// fields is enabled in system settings.
@@ -986,7 +987,8 @@ class PlatformDispatcher {
986
987
///
987
988
/// * [EditableText.obscureText] , which when set to true hides the text in
988
989
/// the text field.
989
- bool get brieflyShowPassword => configuration.brieflyShowPassword;
990
+ bool get brieflyShowPassword => _brieflyShowPassword;
991
+ bool _brieflyShowPassword = true ;
990
992
991
993
/// The setting indicating the current brightness mode of the host platform.
992
994
/// If the platform has no preference, [platformBrightness] defaults to
@@ -1040,8 +1042,16 @@ class PlatformDispatcher {
1040
1042
final double textScaleFactor = (data['textScaleFactor' ]! as num ).toDouble ();
1041
1043
final bool alwaysUse24HourFormat = data['alwaysUse24HourFormat' ]! as bool ;
1042
1044
final bool ? nativeSpellCheckServiceDefined = data['nativeSpellCheckServiceDefined' ] as bool ? ;
1045
+ if (nativeSpellCheckServiceDefined != null ) {
1046
+ _nativeSpellCheckServiceDefined = nativeSpellCheckServiceDefined;
1047
+ } else {
1048
+ _nativeSpellCheckServiceDefined = false ;
1049
+ }
1043
1050
// This field is optional.
1044
1051
final bool ? brieflyShowPassword = data['brieflyShowPassword' ] as bool ? ;
1052
+ if (brieflyShowPassword != null ) {
1053
+ _brieflyShowPassword = brieflyShowPassword;
1054
+ }
1045
1055
final Brightness platformBrightness =
1046
1056
data['platformBrightness' ]! as String == 'dark' ? Brightness .dark : Brightness .light;
1047
1057
final String ? systemFontFamily = data['systemFontFamily' ] as String ? ;
@@ -1058,8 +1068,6 @@ class PlatformDispatcher {
1058
1068
_configuration = previousConfiguration.copyWith (
1059
1069
textScaleFactor: textScaleFactor,
1060
1070
alwaysUse24HourFormat: alwaysUse24HourFormat,
1061
- nativeSpellCheckServiceDefined: nativeSpellCheckServiceDefined ?? false ,
1062
- brieflyShowPassword: brieflyShowPassword,
1063
1071
platformBrightness: platformBrightness,
1064
1072
systemFontFamily: systemFontFamily,
1065
1073
);
@@ -1247,8 +1255,6 @@ class PlatformConfiguration {
1247
1255
this .semanticsEnabled = false ,
1248
1256
this .platformBrightness = Brightness .light,
1249
1257
this .textScaleFactor = 1.0 ,
1250
- this .nativeSpellCheckServiceDefined = false ,
1251
- this .brieflyShowPassword = true ,
1252
1258
this .locales = const < Locale > [],
1253
1259
this .defaultRouteName,
1254
1260
this .systemFontFamily,
@@ -1261,8 +1267,6 @@ class PlatformConfiguration {
1261
1267
bool ? semanticsEnabled,
1262
1268
Brightness ? platformBrightness,
1263
1269
double ? textScaleFactor,
1264
- bool ? nativeSpellCheckServiceDefined,
1265
- bool ? brieflyShowPassword,
1266
1270
List <Locale >? locales,
1267
1271
String ? defaultRouteName,
1268
1272
String ? systemFontFamily,
@@ -1273,8 +1277,6 @@ class PlatformConfiguration {
1273
1277
semanticsEnabled: semanticsEnabled ?? this .semanticsEnabled,
1274
1278
platformBrightness: platformBrightness ?? this .platformBrightness,
1275
1279
textScaleFactor: textScaleFactor ?? this .textScaleFactor,
1276
- nativeSpellCheckServiceDefined: nativeSpellCheckServiceDefined ?? this .nativeSpellCheckServiceDefined,
1277
- brieflyShowPassword: brieflyShowPassword ?? this .brieflyShowPassword,
1278
1280
locales: locales ?? this .locales,
1279
1281
defaultRouteName: defaultRouteName ?? this .defaultRouteName,
1280
1282
systemFontFamily: systemFontFamily ?? this .systemFontFamily,
@@ -1300,22 +1302,6 @@ class PlatformConfiguration {
1300
1302
/// The system-reported text scale.
1301
1303
final double textScaleFactor;
1302
1304
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
-
1319
1305
/// The full system-reported supported locales of the device.
1320
1306
final List <Locale > locales;
1321
1307
0 commit comments