encode method
Convert obj
of type T
to a map of String to
json encodable objects. Can only be called once for
each object in data heap.
Implementation
@override
Map<String, dynamic> encode(Locale? obj) {
if (obj == null) return {};
return {
'languageCode': obj.languageCode,
'countryCode': obj.countryCode,
'scriptCode': obj.scriptCode,
};
}