setPersistStateSingleton method

void setPersistStateSingleton()

Implementation

void setPersistStateSingleton() {
  _persistStateSingleton = (persistStateProvider ?? _persistStateGlobalTest);
  _persistStateSingleton ??= _persistStateGlobal;

  assert(() {
    if (_persistStateSingleton == null) {
      StatesRebuilerLogger.log(
        '',
        'No implementation of `IPersistStore` is provided.',
      );
      StatesRebuilerLogger.log(
        '',
        '''
PLEASE IMPLEMENT THE `IPersistStore` INTERFACE AND INITIALIZE IT IN THE "main" METHOD.

void main() async {
WidgetsFlutterBinding.ensureInitialized();

await RM.storageInitializer(YouImplementation());
runApp(_MyApp());
}

IF YOU ARE TESTING THE APP USE:

final store = await RM.storageInitializerMock();


''',
      );
      return false;
    }

    return true;
  }());
}