put method Null safety

Map put(
  1. String key,
  2. Object? value
)

key and value的功能

Implementation

Map put(String key, Object? value) {
  if (value != null && value is String && value.isNotEmpty) {
    this![key] = value;
  } else if (value != null && value is! String) {
    this![key] = value;
  }
  return this!;
}