getBool method

Future<bool?> getBool(
  1. String key
)

读取布尔值

Implementation

Future<bool?> getBool(String key) async {
  final prefs = await _sharedPreferences;
  return prefs.getBool(key);
}