TextPart.fromJson constructor

TextPart.fromJson(
  1. Map<String, Object?> json
)

Creates a text part from a JSON-compatible map.

Implementation

factory TextPart.fromJson(Map<String, Object?> json) {
  return TextPart(json[_Json.content] as String);
}