laad method

Future<void> laad()

Implementation

Future<void> laad() async {
  final prefs = await SharedPreferences.getInstance();
  final json = prefs.getString(_prefsKey);
  if (json != null) {
    try {
      _boom = KabelBoom.fromJson(jsonDecode(json) as Map<String, dynamic>);
    } catch (_) {
      _boom = null;
    }
  }
  notifyListeners();
}