This commit is contained in:
Felipe
2024-01-09 17:24:14 -05:00
parent ae932ca582
commit 240791fb93
2 changed files with 39 additions and 25 deletions
+8 -11
View File
@@ -29,7 +29,6 @@ import 'package:prosappco/src/presentation/widgets/shared/drawer_menu.dart';
import 'package:prosappco/src/presentation/widgets/shared/primary_button.dart';
import 'package:prosappco/src/presentation/widgets/shared/warning_snackbar.dart';
import 'package:prosappco/src/providers/user_provider.dart';
import 'package:prosappco/src/utils/time_of_day_extension.dart';
import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart';
@@ -75,11 +74,9 @@ class _ServiceScreenState extends State<ServiceScreen> {
int? professionalTarifa;
double? professionalLatitude;
double? professionalLongitude;
DateTime? _selectedDate;
String _ciudad = '...';
TimeOfDay? _selectedTime;
final DateFormat formatter = DateFormat('dd/MM/yyyy');
dynamic coordinates;
Set<Marker> markers = {};
@@ -387,10 +384,13 @@ class _ServiceScreenState extends State<ServiceScreen> {
);
if (datos != null) {
Professional? profesional = datos[0];
ubicacion = datos[1];
fechaSeleccionada = datos[0];
horaSeleccionada = datos[1];
Professional? profesional = datos[2];
profesionalSeleccionado = profesional;
if (profesional != null) {
ubicacion = datos[3];
if (mounted) {
setState(() {
_profesionalController.text =
@@ -515,7 +515,7 @@ class _ServiceScreenState extends State<ServiceScreen> {
profesionalSeleccionado = profesional;
if (profesional != null) {
ubicacion = profesional.ubicacion;
ubicacion = datos[3];
if (mounted) {
setState(() {
_profesionalController.text =
@@ -751,7 +751,7 @@ class _ServiceScreenState extends State<ServiceScreen> {
WarningSnackbar.show(
title: 'Llena todos los campos',
message:
'Asegurate de llenar todos los campos antes de solicitar un servicio. $e',
'Asegurate de llenar todos los campos antes de solicitar un servicio.',
);
}
}
@@ -1101,10 +1101,7 @@ class _ServiceScreenState extends State<ServiceScreen> {
}
if (mounted) {
setState(() {
_selectedDate = pickedDate;
_selectedTime = pickedTime;
});
setState(() {});
}
}
}