ErrorDto.fromJson constructor

ErrorDto.fromJson(
  1. String json
)

Creates an ErrorDto from a JSON string.

json is a JSON string containing the error data.

Returns a new ErrorDto instance.

Implementation

factory ErrorDto.fromJson(String json) {
  final map = Map<String, dynamic>.from(jsonDecode(json));
  return ErrorDto.fromMap(map);
}