use more fitting floating action button, cleanup
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				Build and release APK / Build APK (pull_request) Successful in 5m24s
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	Build and release APK / Build APK (pull_request) Successful in 5m24s
				
			This commit is contained in:
		| @@ -77,6 +77,9 @@ class _MapWidgetState extends State<MapWidget> { | ||||
|       // onLongPress: , | ||||
|       markers: mapMarkers, | ||||
|       cloudMapId: MAP_ID, | ||||
|       mapToolbarEnabled: false, | ||||
|       zoomControlsEnabled: false, | ||||
| 
 | ||||
|     ); | ||||
|   } | ||||
| } | ||||
| @@ -25,52 +25,38 @@ class _NewTripButtonState extends State<NewTripButton> { | ||||
|         if (widget.trip.landmarks.isEmpty){ | ||||
|           return Container(); | ||||
|         } | ||||
|         return SizedBox( | ||||
|           width: 200, | ||||
|           child: ElevatedButton( | ||||
|             onPressed: () async { | ||||
|               Future<UserPreferences> preferences = loadUserPreferences(); | ||||
|               Trip trip = widget.trip; | ||||
|               fetchTrip(trip, preferences); | ||||
|               Navigator.of(context).push( | ||||
|                 MaterialPageRoute( | ||||
|                   builder: (context) => BasePage(mainScreen: "map", trip: trip) | ||||
|                 ) | ||||
|               ); | ||||
|         return FloatingActionButton.extended( | ||||
|           onPressed: () async { | ||||
|             Future<UserPreferences> preferences = loadUserPreferences(); | ||||
|             Trip trip = widget.trip; | ||||
|             fetchTrip(trip, preferences); | ||||
|             Navigator.of(context).push( | ||||
|               MaterialPageRoute( | ||||
|                 builder: (context) => BasePage(mainScreen: "map", trip: trip) | ||||
|               ) | ||||
|             ); | ||||
|           }, | ||||
|           icon: Icon(Icons.add), | ||||
|           label: FutureBuilder( | ||||
|             future: widget.trip.cityName, | ||||
|             builder: (context, snapshot) { | ||||
|               if (snapshot.connectionState == ConnectionState.done) { | ||||
|                 return AutoSizeText( | ||||
|                   'New trip to ${snapshot.data.toString()}', | ||||
|                   style: TextStyle(fontSize: 18), | ||||
|                   maxLines: 2, | ||||
|                 ); | ||||
|               } else { | ||||
|                 return AutoSizeText( | ||||
|                   'New trip to ...', | ||||
|                   style: TextStyle(fontSize: 18), | ||||
|                   maxLines: 2, | ||||
|                 ); | ||||
|               } | ||||
|             }, | ||||
|             child: Row( | ||||
|               mainAxisAlignment: MainAxisAlignment.center, | ||||
|               children: [ | ||||
|                 Icon( | ||||
|                   Icons.add, | ||||
|                 ), | ||||
|                 Expanded( | ||||
|                   child: Padding( | ||||
|                     padding: EdgeInsets.only(left: 10, top: 5, bottom: 5, right: 5), | ||||
|                     child: FutureBuilder( | ||||
|                       future: widget.trip.cityName, | ||||
|                       builder: (context, snapshot) { | ||||
|                         if (snapshot.connectionState == ConnectionState.done) { | ||||
|                           return AutoSizeText( | ||||
|                             'New trip to ${snapshot.data.toString()}', | ||||
|                             style: TextStyle(fontSize: 18), | ||||
|                             maxLines: 2, | ||||
|                           ); | ||||
|                         } else { | ||||
|                           return AutoSizeText( | ||||
|                             'New trip to ...', | ||||
|                             style: TextStyle(fontSize: 18), | ||||
|                             maxLines: 2, | ||||
|                           ); | ||||
|                         } | ||||
|                       }, | ||||
|                     ) | ||||
|                   ) | ||||
|                 ) | ||||
|               ], | ||||
|             ), | ||||
|           ), | ||||
|           ) | ||||
|         ); | ||||
|          | ||||
|       }  | ||||
|     ); | ||||
|   } | ||||
|   | ||||
| @@ -81,6 +81,7 @@ class _NewTripMapState extends State<NewTripMap> { | ||||
|       markers: _markers, | ||||
|       cloudMapId: MAP_ID, | ||||
|       mapToolbarEnabled: false, | ||||
|       zoomControlsEnabled: false, | ||||
|     ); | ||||
|   } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user