diff --git a/lib/screens/user/user_map_screen.dart b/lib/screens/user/user_map_screen.dart index a7d13f7..645601f 100644 --- a/lib/screens/user/user_map_screen.dart +++ b/lib/screens/user/user_map_screen.dart @@ -388,6 +388,7 @@ class _UserMapScreenState extends State { onPressed: isLoading ? null : () { + // tODO: Crear servicio if (serviceLocationPreference == ServiceLocationPreferences.office) { context.read().add( @@ -414,6 +415,24 @@ class _UserMapScreenState extends State { ); } else if (serviceLocationPreference == ServiceLocationPreferences.delivery) { + context.read().add( + CreateService( + professionalId: profesionalSeleccionado! + .professionalInfo.id, + userId: state.user!.id, + address: _addressController.text, + aditionalAddress: '', + latitude: 0, + longitude: 0, + day: fechaSeleccionada.toString(), + createdAt: Timestamp.now(), + description: _observationController.text, + range1Hour1: horaSeleccionada!, + range1Hour2: horaSeleccionada!.add(hour: 2), + rate: '0', + location: serviceLocationPreference!, + ), + ); } else { // TODO: error inesperado }