getString method

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

Reads a string value for key.

Implementation

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