hotfix/fix-upgrade #50
@@ -230,7 +230,34 @@ class _MapboxPagesState extends State<MapboxPages> with ShowAlertDialog {
|
|||||||
drawer: MyDrawer(),
|
drawer: MyDrawer(),
|
||||||
body: isLoading
|
body: isLoading
|
||||||
? const Center(child: CircularProgressIndicator())
|
? const Center(child: CircularProgressIndicator())
|
||||||
: mapbox.MapWidget(
|
: Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
const Text("Mode : "),
|
||||||
|
DropdownButton<String>(
|
||||||
|
value: selectedMode,
|
||||||
|
items: const [
|
||||||
|
DropdownMenuItem(
|
||||||
|
value: 'driving', child: Text("🚗 Voiture")),
|
||||||
|
DropdownMenuItem(
|
||||||
|
value: 'walking', child: Text("🚶 Marche")),
|
||||||
|
DropdownMenuItem(
|
||||||
|
value: 'cycling', child: Text("🚴 Vélo")),
|
||||||
|
],
|
||||||
|
onChanged: (value) {
|
||||||
|
if (value != null) {
|
||||||
|
setState(() {
|
||||||
|
selectedMode = value;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: mapbox.MapWidget(
|
||||||
onMapCreated: (controller) {
|
onMapCreated: (controller) {
|
||||||
mapboxMap = controller;
|
mapboxMap = controller;
|
||||||
},
|
},
|
||||||
@@ -240,6 +267,9 @@ class _MapboxPagesState extends State<MapboxPages> with ShowAlertDialog {
|
|||||||
zoom: 14.0,
|
zoom: 14.0,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
floatingActionButton: FloatingActionButton(
|
floatingActionButton: FloatingActionButton(
|
||||||
onPressed: _drawRouteAndMarkers,
|
onPressed: _drawRouteAndMarkers,
|
||||||
child: const Icon(Icons.directions),
|
child: const Icon(Icons.directions),
|
||||||
|
Reference in New Issue
Block a user