location picker and ui fixes #17
@@ -11,7 +11,7 @@ import 'package:anyway/utils/load_trips.dart';
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
import 'package:anyway/pages/new_trip.dart';
 | 
					import 'package:anyway/pages/new_trip.dart';
 | 
				
			||||||
import 'package:anyway/pages/tutorial.dart';
 | 
					import 'package:anyway/pages/tutorial.dart';
 | 
				
			||||||
import 'package:anyway/pages/trip.dart';
 | 
					import 'package:anyway/pages/current_trip.dart';
 | 
				
			||||||
import 'package:anyway/pages/profile.dart';
 | 
					import 'package:anyway/pages/profile.dart';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -77,6 +77,9 @@ class _MapWidgetState extends State<MapWidget> {
 | 
				
			|||||||
      // onLongPress: ,
 | 
					      // onLongPress: ,
 | 
				
			||||||
      markers: mapMarkers,
 | 
					      markers: mapMarkers,
 | 
				
			||||||
      cloudMapId: MAP_ID,
 | 
					      cloudMapId: MAP_ID,
 | 
				
			||||||
 | 
					      mapToolbarEnabled: false,
 | 
				
			||||||
 | 
					      zoomControlsEnabled: false,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -25,52 +25,38 @@ class _NewTripButtonState extends State<NewTripButton> {
 | 
				
			|||||||
        if (widget.trip.landmarks.isEmpty){
 | 
					        if (widget.trip.landmarks.isEmpty){
 | 
				
			||||||
          return Container();
 | 
					          return Container();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        return SizedBox(
 | 
					        return FloatingActionButton.extended(
 | 
				
			||||||
          width: 200,
 | 
					          onPressed: () async {
 | 
				
			||||||
          child: ElevatedButton(
 | 
					            Future<UserPreferences> preferences = loadUserPreferences();
 | 
				
			||||||
            onPressed: () async {
 | 
					            Trip trip = widget.trip;
 | 
				
			||||||
              Future<UserPreferences> preferences = loadUserPreferences();
 | 
					            fetchTrip(trip, preferences);
 | 
				
			||||||
              Trip trip = widget.trip;
 | 
					            Navigator.of(context).push(
 | 
				
			||||||
              fetchTrip(trip, preferences);
 | 
					              MaterialPageRoute(
 | 
				
			||||||
              Navigator.of(context).push(
 | 
					                builder: (context) => BasePage(mainScreen: "map", trip: trip)
 | 
				
			||||||
                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,
 | 
					      markers: _markers,
 | 
				
			||||||
      cloudMapId: MAP_ID,
 | 
					      cloudMapId: MAP_ID,
 | 
				
			||||||
      mapToolbarEnabled: false,
 | 
					      mapToolbarEnabled: false,
 | 
				
			||||||
 | 
					      zoomControlsEnabled: false,
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -1,11 +1,11 @@
 | 
				
			|||||||
import 'package:anyway/modules/save_button.dart';
 | 
					import 'package:anyway/modules/current_trip_save_button.dart';
 | 
				
			||||||
import 'package:flutter/material.dart';
 | 
					import 'package:flutter/material.dart';
 | 
				
			||||||
import 'package:sliding_up_panel/sliding_up_panel.dart';
 | 
					import 'package:sliding_up_panel/sliding_up_panel.dart';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import 'package:anyway/structs/trip.dart';
 | 
					import 'package:anyway/structs/trip.dart';
 | 
				
			||||||
import 'package:anyway/modules/landmarks_list.dart';
 | 
					import 'package:anyway/modules/current_trip_landmarks_list.dart';
 | 
				
			||||||
import 'package:anyway/modules/greeter.dart';
 | 
					import 'package:anyway/modules/current_trip_greeter.dart';
 | 
				
			||||||
import 'package:anyway/modules/map.dart';
 | 
					import 'package:anyway/modules/current_trip_map.dart';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -38,15 +38,9 @@ class _NewTripPageState extends State<NewTripPage> {
 | 
				
			|||||||
            padding: EdgeInsets.all(15),
 | 
					            padding: EdgeInsets.all(15),
 | 
				
			||||||
            child: NewTripLocationSearch(trip),
 | 
					            child: NewTripLocationSearch(trip),
 | 
				
			||||||
          ),
 | 
					          ),
 | 
				
			||||||
        Align(
 | 
					 | 
				
			||||||
          alignment: Alignment.bottomRight,
 | 
					 | 
				
			||||||
          child: Padding(
 | 
					 | 
				
			||||||
            padding: EdgeInsets.all(15),
 | 
					 | 
				
			||||||
            child: NewTripButton(trip: trip)
 | 
					 | 
				
			||||||
          ),
 | 
					 | 
				
			||||||
        ),
 | 
					 | 
				
			||||||
        ],
 | 
					        ],
 | 
				
			||||||
      ),
 | 
					      ),
 | 
				
			||||||
 | 
					      floatingActionButton: NewTripButton(trip: trip),
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user