loadSeconds method

  1. @override
Future<int?> loadSeconds()
override

Reads the stored integer value from the device's disk.

Returns the saved int if it exists under the assigned key, otherwise returns null.

Implementation

@override
Future<int?> loadSeconds() async {
  final prefs = await SharedPreferences.getInstance();
  return prefs.getInt(key);
}