toJSON method Null safety

  1. @override
dynamic toJSON(
  1. Map? object,
  2. [SerializationContext? context]
)
override

Implementation

@override
dynamic toJSON(Map? object, [SerializationContext? context]) =>
    object!.map((key, value) =>
        MapEntry(_serializeObject(key).toString(), _serializeObject(value)));