fromJson method

  1. @override
bool fromJson(
  1. dynamic json
)
override

Implementation

@override
bool fromJson(dynamic json) {
  if (json is int) {
    return json == 1;
  } else if (json is bool) {
    return json;
  } else {
    throw ArgumentError.value(json, 'json', 'Expected an int or a bool');
  }
}