22 lines
607 B
Dart
22 lines
607 B
Dart
import 'package:flutter/cupertino.dart';
|
|
import 'package:flutter_map/flutter_map.dart';
|
|
|
|
class MapState extends ChangeNotifier {
|
|
bool _isLocationLock = false;
|
|
bool _isCurrentlyFetchin = false;
|
|
final MapController _mapController = MapController();
|
|
|
|
bool get followLocation => _isLocationLock;
|
|
bool get isCurrentlyFetching => _isCurrentlyFetchin;
|
|
MapController get getMapController => _mapController;
|
|
|
|
toggleLocationLock() {
|
|
_isLocationLock = !_isLocationLock;
|
|
notifyListeners();
|
|
}
|
|
|
|
set setNetworkActivity(bool active) {
|
|
_isCurrentlyFetchin = active;
|
|
notifyListeners();
|
|
}
|
|
} |