putDouble method

Future<void> putDouble(
  1. String key,
  2. String value
)

保存浮点型

Implementation

Future<void> putDouble(String key, String value) async {
  // obtain shared preferences
  final prefs = await SharedPreferences.getInstance();
  await prefs.setString(key, value);
}