readBool method

bool? readBool(
  1. String key
)

Implementation

bool? readBool(String key) {
  final value = getString(key);
  if (value == null) return null;
  bool? flag;
  try {
    flag = jsonDecode(value);
  } catch (err) {
    debugPrint(err.toString());
  }
  return flag;
}