getInt method

  1. @override
Future<int?> getInt(
  1. String key, {
  2. SharedPreferencesPlusOptions options = const SharedPreferencesPlusOptions(),
})
override

Reads an integer value for key.

Implementation

@override
Future<int?> getInt(
  String key, {
  SharedPreferencesPlusOptions options = const SharedPreferencesPlusOptions(),
}) async {
  final value = (await getAll(options: options))[key];
  return value is int ? value : null;
}