setBool method

Future<bool> setBool(
  1. String key,
  2. bool value
)

存储布尔值

Implementation

Future<bool> setBool(String key, bool value) async {
  final prefs = await _sharedPreferences;
  return prefs.setBool(key, value);
}