EditSortMembersParams.fromJson constructor

EditSortMembersParams.fromJson(
  1. JsonDecoder jsonDecoder,
  2. String jsonPath,
  3. Object? json
)

Implementation

factory EditSortMembersParams.fromJson(
    JsonDecoder jsonDecoder, String jsonPath, Object? json) {
  json ??= {};
  if (json is Map) {
    String file;
    if (json.containsKey('file')) {
      file = jsonDecoder.decodeString('$jsonPath.file', json['file']);
    } else {
      throw jsonDecoder.mismatch(jsonPath, 'file');
    }
    return EditSortMembersParams(file);
  } else {
    throw jsonDecoder.mismatch(jsonPath, 'edit.sortMembers params', json);
  }
}