readBool method

Future<bool?> readBool({
  1. required String key,
  2. bool isEncrypted = true,
})

Implementation

Future<bool?> readBool({required String key, bool isEncrypted = true}) async {
  final stringValue = await readString(key: key, isEncrypted: isEncrypted);
  if (stringValue != null) {
    return stringValue.toLowerCase() == 'true';
  }
  return null;
}