automatically save a trip when it is first created
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
		
			
				
	
				Build and deploy the backend to staging / Build and push image (pull_request) Successful in 2m38s
				
			
		
			
				
	
				Run linting on the backend code / Build (pull_request) Successful in 28s
				
			
		
			
				
	
				Run testing on the backend code / Build (pull_request) Failing after 5m22s
				
			
		
			
				
	
				Build and deploy the backend to staging / Deploy to staging (pull_request) Successful in 24s
				
			
		
			
				
	
				Build and release debug APK / Build APK (pull_request) Failing after 3m29s
				
			
		
		
	
	
				
					
				
			
		
			Some checks failed
		
		
	
	Build and deploy the backend to staging / Build and push image (pull_request) Successful in 2m38s
				
			Run linting on the backend code / Build (pull_request) Successful in 28s
				
			Run testing on the backend code / Build (pull_request) Failing after 5m22s
				
			Build and deploy the backend to staging / Deploy to staging (pull_request) Successful in 24s
				
			Build and release debug APK / Build APK (pull_request) Failing after 3m29s
				
			This commit is contained in:
		@@ -19,8 +19,6 @@ class _saveButtonState extends State<saveButton> {
 | 
			
		||||
    return ElevatedButton(
 | 
			
		||||
      onPressed: () async {
 | 
			
		||||
        savedTrips.addTrip(widget.trip);
 | 
			
		||||
        // SharedPreferences prefs = await SharedPreferences.getInstance();
 | 
			
		||||
        // setState(() => widget.trip.toPrefs(prefs));
 | 
			
		||||
        rootScaffoldMessengerKey.currentState!.showSnackBar(
 | 
			
		||||
          SnackBar(
 | 
			
		||||
            content: Text('Trip saved'),
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,6 @@
 | 
			
		||||
import "dart:convert";
 | 
			
		||||
import "dart:developer";
 | 
			
		||||
import "package:anyway/main.dart";
 | 
			
		||||
import 'package:dio/dio.dart';
 | 
			
		||||
 | 
			
		||||
import 'package:anyway/constants.dart';
 | 
			
		||||
@@ -82,6 +83,8 @@ fetchTrip(
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
  log(response.data.toString());
 | 
			
		||||
  // Also save the trip for the user's convenience
 | 
			
		||||
  savedTrips.addTrip(trip);
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -113,7 +116,7 @@ Future<(Landmark, String?)> fetchLandmark(String uuid) async {
 | 
			
		||||
  if (response.data["detail"] != null) {
 | 
			
		||||
    throw Exception(response.data["detail"]);
 | 
			
		||||
  }
 | 
			
		||||
  log(response.data.toString());
 | 
			
		||||
  // log(response.data.toString());
 | 
			
		||||
  Map<String, dynamic> json = response.data;
 | 
			
		||||
  String? nextUUID = json["next_uuid"];
 | 
			
		||||
  Landmark landmark = Landmark.fromJson(json);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user