@@ -131,7 +131,7 @@ class KeyedArchive extends Object
131
131
_map[key] = value;
132
132
}
133
133
134
- dynamic operator [](Object ? key) => _getValue (key as String );
134
+ dynamic operator [](Object ? key) => _getValue (key as String ? );
135
135
136
136
Iterable <String > get keys => _map.keys;
137
137
@@ -153,7 +153,7 @@ class KeyedArchive extends Object
153
153
return out;
154
154
}
155
155
156
- dynamic _getValue (String key) {
156
+ dynamic _getValue (String ? key) {
157
157
if (_map.containsKey (key)) {
158
158
return _map[key];
159
159
}
@@ -228,7 +228,7 @@ class KeyedArchive extends Object
228
228
/// If this object is a reference to another object (via [referenceURI] ), this object's key-value
229
229
/// pairs will be searched first. If [key] is not found, the referenced object's key-values pairs are searched.
230
230
/// If no match is found, null is returned.
231
- T ? decode <T >(String key) {
231
+ T ? decode <T >(String ? key) {
232
232
var v = _getValue (key);
233
233
if (v == null ) {
234
234
return null ;
@@ -248,7 +248,7 @@ class KeyedArchive extends Object
248
248
/// [inflate] must create an empty instance of [T] . The value associated with [key]
249
249
/// must be a [KeyedArchive] (a [Map] ). The values of the associated object are read into
250
250
/// the empty instance of [T] .
251
- T ? decodeObject <T extends Coding >(String key, T inflate ()) {
251
+ T ? decodeObject <T extends Coding >(String ? key, T inflate ()) {
252
252
final val = _getValue (key);
253
253
if (val == null ) {
254
254
return null ;
@@ -287,7 +287,7 @@ class KeyedArchive extends Object
287
287
/// must be a [KeyedArchive] (a [Map] ), where each value is a [T] .
288
288
/// For each key-value pair of the archived map, [inflate] is invoked and
289
289
/// each value is decoded into the instance of [T] .
290
- Map <String , T ?>? decodeObjectMap <T extends Coding >(String key, T inflate ()) {
290
+ Map <String , T ?>? decodeObjectMap <T extends Coding >(String ? key, T inflate ()) {
291
291
var v = _getValue (key);
292
292
if (v == null ) {
293
293
return null ;
0 commit comments