encodeErrorEnvelope method Null safety
override
Encodes an error result into a binary envelope.
The specified error code
, human-readable error message
and error
details
correspond to the fields of PlatformException.
Implementation
@override
ByteData encodeErrorEnvelope({ required String code, String? message, Object? details}) {
assert(code != null);
return const JSONMessageCodec().encodeMessage(<Object?>[code, message, details])!;
}