boolFromJson function

bool? boolFromJson(
  1. dynamic value
)

Implementation

bool? boolFromJson(dynamic value) {
  if (value == null) return null;
  if (value is bool) return value;
  return value.toString().toLowerCase() == 'true';
}