readInt method

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

Implementation

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