saveString static method

Future<void> saveString(
  1. String key,
  2. String data
)

Implementation

static Future<void> saveString(String key, String data) async {
  final SharedPreferences prefs = await SharedPreferences.getInstance();
  await prefs.setString(key, data);
}