fromJson method

  1. @override
bool? fromJson(
  1. Object? json
)

Implementation

@override
bool? fromJson(Object? json) {
  if (json == null) return null;
  if (json is bool) return json;
  if (json is int) return json != 0;
  return null; // invalid → null
}