From de6a7f239979313a8d8504d7f7adaad22d58b6bb Mon Sep 17 00:00:00 2001 From: Valentin CZERYBA Date: Sun, 17 Nov 2024 11:38:59 +0100 Subject: [PATCH] icons worked --- covas_mobile/lib/pages/MapboxPages.dart | 35 ++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/covas_mobile/lib/pages/MapboxPages.dart b/covas_mobile/lib/pages/MapboxPages.dart index 0cda564..6fab826 100644 --- a/covas_mobile/lib/pages/MapboxPages.dart +++ b/covas_mobile/lib/pages/MapboxPages.dart @@ -317,9 +317,38 @@ class _MapboxPagesState extends State with ShowErrorDialog { actions: [ DropdownButton( value: selectedMode, - items: ['walking', 'cycling', 'driving'].map((mode) { - return DropdownMenuItem(value: mode, child: Text(mode)); - }).toList(), + items: [ + DropdownMenuItem( + value: 'walking', + child: Row( + children: [ + Icon(Icons.directions_walk, color: Colors.blue), + SizedBox(width: 8), + Text('Walking'), + ], + ), + ), + DropdownMenuItem( + value: 'cycling', + child: Row( + children: [ + Icon(Icons.directions_bike, color: Colors.green), + SizedBox(width: 8), + Text('Cycling'), + ], + ), + ), + DropdownMenuItem( + value: 'driving', + child: Row( + children: [ + Icon(Icons.directions_car, color: Colors.red), + SizedBox(width: 8), + Text('Driving'), + ], + ), + ), + ], onChanged: (mode) { setState(() { selectedMode = mode!;