fromJson static method

TextRange? fromJson(
  1. Map<String, dynamic>? json
)

Implementation

static TextRange? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  return TextRange(
    offset: (json['offset'] as int?) ?? 0,
    length: (json['length'] as int?) ?? 0,
  );
}