refactored code to work with simple popup when marker is clicked
This commit is contained in:
@@ -1,10 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:async/async.dart';
|
||||
import 'package:flutter_map/flutter_map.dart';
|
||||
import 'package:latlong2/latlong.dart';
|
||||
|
||||
import '../model/flood_station.dart';
|
||||
import '../widgets/custom_marker.dart';
|
||||
import 'api.dart';
|
||||
|
||||
class FloodStationProvider extends ChangeNotifier {
|
||||
@@ -16,17 +12,6 @@ class FloodStationProvider extends ChangeNotifier {
|
||||
|
||||
List<FloodStation> get allStations => _allStations;
|
||||
List<FloodStation> get filteredStations => _filteredStations;
|
||||
List<Marker> get stationsAsMarkers {
|
||||
return allStations
|
||||
.map<Marker>(
|
||||
(e) => Marker(
|
||||
alignment: Alignment.center,
|
||||
point: LatLng(e.lat, e.long),
|
||||
child: CustomMarker(),
|
||||
),
|
||||
)
|
||||
.toList();
|
||||
}
|
||||
|
||||
CancelableOperation? _filteredStationsFuture;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user