Aidra Driver 1.3.5+68
Aidra Driver - Your path to green energy
Loading...
Searching...
No Matches
map_widget.dart
Go to the documentation of this file.
1import 'package:flutter/material.dart';
2import 'package:google_maps_flutter/google_maps_flutter.dart';
3
4class MapWidget extends StatelessWidget {
5 final LatLng currentLocation;
6 final Set<Marker> markers;
7 final bool isMapLoaded;
8 final Function(GoogleMapController) onMapCreated;
10
11 const MapWidget({
12 super.key,
13 required this.currentLocation,
14 required this.markers,
15 required this.isMapLoaded,
16 required this.onMapCreated,
17 required this.mapStyle,
18 });
19
20 @override
21 Widget build(BuildContext context) {
22 return Stack(
23 children: [
24 GoogleMap(
25 style: mapStyle,
26 initialCameraPosition: CameraPosition(
27 target: currentLocation,
28 zoom: 10,
29 ),
30 onMapCreated: onMapCreated,
32 myLocationEnabled: false,
33 myLocationButtonEnabled: false,
34 zoomControlsEnabled: false,
35 zoomGesturesEnabled: false,
36 scrollGesturesEnabled: false,
37 rotateGesturesEnabled: false,
38 tiltGesturesEnabled: false,
39 mapToolbarEnabled: false,
40 compassEnabled: false,
41 ),
42 if (!isMapLoaded)
43 Container(
44 color: Colors.white.withValues(alpha: 0.7),
45 child: const Center(
46 child: CircularProgressIndicator(),
47 ),
48 ),
49 ],
50 );
51 }
52}
final Set< Marker > markers
final Widget child
final Function(GoogleMapController) onMapCreated
override Widget build(BuildContext context)
const MapWidget({ super.key, required this.currentLocation, required this.markers, required this.isMapLoaded, required this.onMapCreated, required this.mapStyle, })
final bool isMapLoaded
final String mapStyle
final LatLng currentLocation
class Partner String