Message.fromJson constructor
Implementation
factory Message.fromJson(
Map<String, dynamic> json, {
String what = 'A message response',
}) {
// Empty is allowed here, unlike the tokens and identifiers elsewhere: this
// is prose for a human, and an endpoint that has nothing to say is not a
// fault worth failing the call over.
return Message(
message: requireString(json, 'message', what, allowEmpty: true),
);
}