fromJson method

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

Implementation

@override
bool fromJson(value) {
  try {
    //print("IntBoolTransform raw value: $value");
    if (value == null) return null;
    if (value is bool) return value;
    if (value is int) {
      //print("IntBoolTransform value: $value");
      return DfConverter.intToBool(value);
    }
    if (value < 0) return null;
    return null;
  } catch (e) {
    return null;
  }
}