chore(02-01): add provider dependencies and refactor GpsDataManager
- Added provider ^6.1.2 and shared_preferences ^2.3.4 to pubspec.yaml - Removed singleton pattern from GpsDataManager (deleted _instance and instance getter) - Changed GpsDataManager._internal() to public GpsDataManager() constructor - Extended ChangeNotifier to enable reactive state updates - Added _isDisposed guard field to prevent disposed notifications - Updated _updateData() to call notifyListeners() after stream emission - Added _isDisposed guards to _onGpsError() and _handleStaleDataTimeout() - Updated dispose() to set _isDisposed, call super.dispose() last, removed _isInitialized reset
This commit is contained in:
@@ -27,6 +27,12 @@ dependencies:
|
||||
# Bring app to foreground from background/overlay
|
||||
bg_launcher: ^0.1.0
|
||||
|
||||
# State management
|
||||
provider: ^6.1.2
|
||||
|
||||
# Persistent settings storage
|
||||
shared_preferences: ^2.3.4
|
||||
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
||||
Reference in New Issue
Block a user