This commit is contained in:
Felipe
2024-08-02 18:46:17 -05:00
parent e1717f1be7
commit 408744fcc6
7 changed files with 9 additions and 15 deletions
@@ -20,8 +20,7 @@ class ProfessionalListBloc
on<ProfessionalListFetch>(_onProfessionalListFetch); on<ProfessionalListFetch>(_onProfessionalListFetch);
} }
void _onProfessionalListFetch( void _onProfessionalListFetch(ProfessionalListFetch event, Emitter<ProfessionalListState> emit) async {
ProfessionalListFetch event, Emitter<ProfessionalListState> emit) async {
emit(ProfessionalListLoading()); emit(ProfessionalListLoading());
final users = await _userRepository.getUsersProfessionalActive(); final users = await _userRepository.getUsersProfessionalActive();
@@ -37,8 +37,7 @@ class _ConfigurationSupportScreenState
} }
Future<void> _sendWhatsapp(String? number) async { Future<void> _sendWhatsapp(String? number) async {
final _whatsappUrl = final _whatsappUrl = 'https://api.whatsapp.com/send?phone=$number&text=Hola%21+soy+usuario+de+Prosapp+y+quisiera+conocer+mas+sobre+esta+app+%F0%9F%98%81';
'https://api.whatsapp.com/send?phone=$number&text=Hola%21+soy+usuario+de+Prosapp+y+quisiera+conocer+mas+sobre+esta+app+%F0%9F%98%81';
if (!await launch(_whatsappUrl)) { if (!await launch(_whatsappUrl)) {
ScaffoldMessenger.of(context).clearSnackBars(); ScaffoldMessenger.of(context).clearSnackBars();
ScaffoldMessenger.of(context).showSnackBar(const SnackBar( ScaffoldMessenger.of(context).showSnackBar(const SnackBar(
@@ -26,8 +26,7 @@ class _UserServiceListScreenState extends State<UserServiceListScreen> {
serviceBloc = Injector.appInstance.get<ServiceBloc>(); serviceBloc = Injector.appInstance.get<ServiceBloc>();
serviceBloc serviceBloc.add(LoadServicesForUser(FirebaseAuth.instance.currentUser!.uid));
.add(LoadServicesForUser(FirebaseAuth.instance.currentUser!.uid));
} }
@override @override
@@ -44,7 +44,7 @@ class _ProfessionalScheduleScreenState
), ),
ScheduleItem( ScheduleItem(
label: "Martes", label: "Martes",
schedule: schedules.thursday, schedule: schedules.tuesday,
onChanged: (s) { onChanged: (s) {
setState(() => schedules = schedules.copyWith(thursday: s)); setState(() => schedules = schedules.copyWith(thursday: s));
}, },
@@ -58,7 +58,7 @@ class _ProfessionalScheduleScreenState
), ),
ScheduleItem( ScheduleItem(
label: "Jueves", label: "Jueves",
schedule: schedules.tuesday, schedule: schedules.thursday,
onChanged: (s) { onChanged: (s) {
setState(() => schedules = schedules.copyWith(tuesday: s)); setState(() => schedules = schedules.copyWith(tuesday: s));
}, },
+2 -3
View File
@@ -160,11 +160,10 @@ class _ServiceScreenState extends State<ServiceScreen> {
color: Colors.black54, color: Colors.black54,
), ),
const SizedBox(width: 15), const SizedBox(width: 15),
service.location == service.location == ServiceLocationPreferences
ServiceLocationPreferences
.delivery .delivery
? const Text( ? const Text(
'Servicio a s domicilio.', 'Servicio a domicilio.',
style: TextStyle( style: TextStyle(
color: Colors.black, color: Colors.black,
fontSize: 14), fontSize: 14),
+1 -2
View File
@@ -262,8 +262,7 @@ class _UserMapScreenState extends State<UserMapScreen> {
})); }));
}, },
onCameraMove: (position) { onCameraMove: (position) {
if (serviceLocationPreference != if (serviceLocationPreference != ServiceLocationPreferences.office) {
ServiceLocationPreferences.office) {
coordenadas = position.target; coordenadas = position.target;
} }
}, },
@@ -5,8 +5,7 @@ class FirebaseServiceRepository {
final serviceCollection = FirebaseFirestore.instance.collection('services'); final serviceCollection = FirebaseFirestore.instance.collection('services');
Future<String> createService(ServiceEntity entity) async { Future<String> createService(ServiceEntity entity) async {
DocumentReference<Map<String, dynamic>> docRef = DocumentReference<Map<String, dynamic>> docRef = await serviceCollection.add(entity.toDocument());
await serviceCollection.add(entity.toDocument());
return docRef.id; return docRef.id;
} }