tryParse method

  1. @override
bool? tryParse(
  1. dynamic source
)
override

Try to convert to value from any given json

Implementation

@override
bool? tryParse(source) {
  if (source == true || source.toString() == 'true') return true;
  if (source == false || source.toString() == 'false') return false;
  return null;
}