getFluttermojiOptions method
Implementation
Future<Map<String?, int>> getFluttermojiOptions() async {
SharedPreferences pref = await SharedPreferences.getInstance();
String? _fluttermojiOptions = pref.getString('fluttermojiSelectedOptions');
if (_fluttermojiOptions == null || _fluttermojiOptions == '') {
Map<String?, int> _fluttermojiOptionsMap =
Map.from(defaultFluttermojiOptions);
await pref.setString(
'fluttermojiSelectedOptions', jsonEncode(_fluttermojiOptionsMap));
selectedOptions = _fluttermojiOptionsMap;
update();
return _fluttermojiOptionsMap;
}
selectedOptions = Map.from(jsonDecode(_fluttermojiOptions));
update();
return Map.from(jsonDecode(_fluttermojiOptions));
}