RxPersistInt constructor
Rx persistent class, with the persistent key of _persistKey.
Default value to initial if the persistent storage returns null.
Implementation
RxPersistInt(String key, [int initial = 0])
: assert(_isPersistenceInit,
'Persistent storage did not initialize, please use initGlobalPersist() in main()'),
super(key, initial) {
_value = _sharedPreferences.getInt(_persistKey) ?? initial;
}