feat: make server own products
This commit is contained in:
@@ -35,6 +35,11 @@ class RemoteSyncViewModel extends ChangeNotifier {
|
||||
String? _lastError;
|
||||
String? get lastError => _lastError;
|
||||
|
||||
bool _isOffline = false;
|
||||
|
||||
/// The last sync failed for lack of a connection, not because of an error.
|
||||
bool get isOffline => _isOffline;
|
||||
|
||||
String? _venueId;
|
||||
String? get venueId => _venueId;
|
||||
|
||||
@@ -109,8 +114,10 @@ class RemoteSyncViewModel extends ChangeNotifier {
|
||||
case RemoteSyncEventType.syncCompleted:
|
||||
_lastSyncAt = DateTime.now();
|
||||
_lastError = null;
|
||||
_isOffline = false;
|
||||
case RemoteSyncEventType.syncFailed:
|
||||
_lastError = event.message;
|
||||
_isOffline = event.offline;
|
||||
case RemoteSyncEventType.unauthorized:
|
||||
_isConfigured = false;
|
||||
_wasRevoked = true;
|
||||
|
||||
Reference in New Issue
Block a user