icons worked

This commit is contained in:
Valentin CZERYBA 2024-11-17 11:38:59 +01:00
parent c8223d9b7d
commit de6a7f2399

View File

@ -317,9 +317,38 @@ class _MapboxPagesState extends State<MapboxPages> with ShowErrorDialog {
actions: [ actions: [
DropdownButton<String>( DropdownButton<String>(
value: selectedMode, value: selectedMode,
items: ['walking', 'cycling', 'driving'].map((mode) { items: [
return DropdownMenuItem(value: mode, child: Text(mode)); DropdownMenuItem(
}).toList(), 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) { onChanged: (mode) {
setState(() { setState(() {
selectedMode = mode!; selectedMode = mode!;