@@ -25,12 +25,26 @@ extension _ExtractExt on List<SettingsEntity> {
2525 return settings.defaultValue;
2626 }
2727 return (switch (T ) {
28+ // ref: https://github.com/dart-lang/sdk/issues/59334
29+ // ignore: type_literal_in_constant_pattern
2830 int => v.intValue,
31+ // ref: https://github.com/dart-lang/sdk/issues/59334
32+ // ignore: type_literal_in_constant_pattern
2933 double => v.doubleValue,
34+ // ref: https://github.com/dart-lang/sdk/issues/59334
35+ // ignore: type_literal_in_constant_pattern
3036 String => v.stringValue,
37+ // ref: https://github.com/dart-lang/sdk/issues/59334
38+ // ignore: type_literal_in_constant_pattern
3139 bool => v.boolValue,
40+ // ref: https://github.com/dart-lang/sdk/issues/59334
41+ // ignore: type_literal_in_constant_pattern
3242 DateTime => v.dateTimeValue,
43+ // ref: https://github.com/dart-lang/sdk/issues/59334
44+ // ignore: type_literal_in_constant_pattern
3345 Offset => v.offsetValue,
46+ // ref: https://github.com/dart-lang/sdk/issues/59334
47+ // ignore: type_literal_in_constant_pattern
3448 Size => v.sizeValue,
3549 _ => null ,
3650 } ??
@@ -133,12 +147,26 @@ final class SettingsRepository with LoggerMixin {
133147
134148 final name = key.name;
135149 final v = await switch (T ) {
150+ // ref: https://github.com/dart-lang/sdk/issues/59334
151+ // ignore: type_literal_in_constant_pattern
136152 int => _storage.getInt (name),
153+ // ref: https://github.com/dart-lang/sdk/issues/59334
154+ // ignore: type_literal_in_constant_pattern
137155 double => _storage.getDouble (name),
156+ // ref: https://github.com/dart-lang/sdk/issues/59334
157+ // ignore: type_literal_in_constant_pattern
138158 String => _storage.getString (name),
159+ // ref: https://github.com/dart-lang/sdk/issues/59334
160+ // ignore: type_literal_in_constant_pattern
139161 bool => _storage.getBool (name),
162+ // ref: https://github.com/dart-lang/sdk/issues/59334
163+ // ignore: type_literal_in_constant_pattern
140164 DateTime => _storage.getDateTime (name),
165+ // ref: https://github.com/dart-lang/sdk/issues/59334
166+ // ignore: type_literal_in_constant_pattern
141167 Offset => _storage.getOffset (name),
168+ // ref: https://github.com/dart-lang/sdk/issues/59334
169+ // ignore: type_literal_in_constant_pattern
142170 Size => _storage.getSize (name),
143171 _ => () {
144172 error ('failed to getValue for key $key : unsupported type $T ' );
@@ -165,12 +193,26 @@ final class SettingsRepository with LoggerMixin {
165193
166194 final name = key.name;
167195 final _ = await switch (T ) {
196+ // ref: https://github.com/dart-lang/sdk/issues/59334
197+ // ignore: type_literal_in_constant_pattern
168198 int => _storage.saveInt (name, value as int ),
199+ // ref: https://github.com/dart-lang/sdk/issues/59334
200+ // ignore: type_literal_in_constant_pattern
169201 double => _storage.saveDouble (name, value as double ),
202+ // ref: https://github.com/dart-lang/sdk/issues/59334
203+ // ignore: type_literal_in_constant_pattern
170204 String => _storage.saveString (name, value as String ),
205+ // ref: https://github.com/dart-lang/sdk/issues/59334
206+ // ignore: type_literal_in_constant_pattern
171207 bool => _storage.saveBool (name, value: value as bool ),
208+ // ref: https://github.com/dart-lang/sdk/issues/59334
209+ // ignore: type_literal_in_constant_pattern
172210 DateTime => _storage.saveDateTime (name, value as DateTime ),
211+ // ref: https://github.com/dart-lang/sdk/issues/59334
212+ // ignore: type_literal_in_constant_pattern
173213 Offset => _storage.saveOffset (name, value as Offset ),
214+ // ref: https://github.com/dart-lang/sdk/issues/59334
215+ // ignore: type_literal_in_constant_pattern
174216 Size => _storage.saveSize (name, value as Size ),
175217 final t => () {
176218 error ('failed to save settings for key $key :'
0 commit comments