added search functionality

This commit is contained in:
2024-03-27 02:32:05 +01:00
parent 911c2738aa
commit 799d1cb335
6 changed files with 103 additions and 3 deletions

View File

@ -1,16 +1,24 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter_map/flutter_map.dart';
import 'package:geolocator/geolocator.dart';
import 'package:latlong2/latlong.dart';
class MapState extends ChangeNotifier {
bool _isCurrentlyLoading = false;
LatLng? _activeMarker;
final MapController _mapController = MapController();
final Geolocator _geolocator = Geolocator();
bool get isCurrentlyLoading => _isCurrentlyLoading;
LatLng? get getActiveMarker => _activeMarker;
MapController get getMapController => _mapController;
Geolocator get getGeolocator => _geolocator;
void setActiveMarker(LatLng? marker) {
_activeMarker = marker;
notifyListeners();
}
void setLoading(bool loading) {
_isCurrentlyLoading = loading;
notifyListeners();