putDouble static method

Future<bool> putDouble(
  1. String? key,
  2. double? value
)

存储sp中key的double值

Implementation

static Future<bool> putDouble(String? key, double? value) async {
  if (key == null || key.isEmpty || value == null) {
    return false;
  }
  return await _preferences.setDouble(key, value);
}