basic state management
This commit is contained in:
12
lib/state/mapState.dart
Normal file
12
lib/state/mapState.dart
Normal file
@ -0,0 +1,12 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
|
||||
class MapState extends ChangeNotifier {
|
||||
bool _isLocationLock = false;
|
||||
|
||||
bool get followLocation => _isLocationLock;
|
||||
|
||||
toggleLocationLock() {
|
||||
_isLocationLock = !_isLocationLock;
|
||||
notifyListeners();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user