persist method

Future<bool> persist()

Saves the configuration to the shared-preferences. This can be useful when you want to persist theme settings after clearing shared-preferences. e.g. when user logs out, usually, preferences are cleared. Call this method after clearing preferences to persist theme mode.

Implementation

Future<bool> persist() async => _preferences.save();