readFromPersistentStorage method Null safety

Future<void> readFromPersistentStorage()

Implementation

Future<void> readFromPersistentStorage() async {
  final storage = await SharedPreferences.getInstance();
  String? js = storage.getString('init');
  if (js != null) {
    try {
      decodeJson(json.decode(js) as Map<String, dynamic>, needsSave: false);
    } finally {
      display.displayX(flash: false);
    }
  }
}