setValue static method
value 只能是String、int、double、bool、null(移除)、 List<String、int、double、bool> Map<String, (String、int、double、bool)>
Implementation
static Future<void> setValue(String key, dynamic value) async {
if (canSave(value)) {
await _cacheApi.setValue(key, value);
} else {
throw ArgumentError('Cannot be saved for invalid data type: ${value.runtimeType}');
}
}