feat: Consolidate group and account creation into a single method and improve error handling in trip creation
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:travel_mate/blocs/group/group_bloc.dart';
|
||||
import 'package:travel_mate/blocs/group/group_event.dart';
|
||||
import 'package:travel_mate/blocs/trip/trip_bloc.dart';
|
||||
import 'package:travel_mate/blocs/trip/trip_event.dart';
|
||||
import 'package:travel_mate/components/home/create_trip_content.dart';
|
||||
@@ -142,7 +140,6 @@ class _ShowTripDetailsContentState extends State<ShowTripDetailsContent> {
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
context.read<TripBloc>().add(TripDeleteRequested(tripId: widget.trip.id!));
|
||||
context.read<GroupBloc>().add(DeleteGroup(widget.trip.id!));
|
||||
Navigator.pop(context); // Fermer le dialogue
|
||||
Navigator.pop(context, true); // Retourner à l'écran précédent
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user