diff --git a/lib/src/authentication/authentication_repository.dart b/lib/src/authentication/authentication_repository.dart index f626282..d0b38a1 100644 --- a/lib/src/authentication/authentication_repository.dart +++ b/lib/src/authentication/authentication_repository.dart @@ -3,6 +3,7 @@ import 'package:firebase_auth/firebase_auth.dart'; import 'package:get/get.dart'; import 'package:google_sign_in/google_sign_in.dart'; import 'package:prosappco/src/authentication/exceptions/register_failed.dart'; +import 'package:prosappco/src/models/user_model.dart'; import 'package:prosappco/src/screens/login.dart'; import 'package:prosappco/src/screens/service.dart'; diff --git a/lib/src/models/user_model.dart b/lib/src/models/user_model.dart index b02aa02..9939061 100644 --- a/lib/src/models/user_model.dart +++ b/lib/src/models/user_model.dart @@ -9,26 +9,31 @@ class UserModel { final String? state; final Reference? photo; final int? tarifa; + final String? phoneNumber; + final String? token; UserModel(this.name, this.city, this.profession, this.state, this.photo, - this.tarifa); + this.tarifa, this.phoneNumber, this.token); static Future fromJson( Map? json, String uid) async { try { - if (json == null) return UserModel('', '', '', null, null, 0); + if (json == null) return UserModel('', '', '', null, null, 0, '', ''); String? avatar = json['photo']; return UserModel( - json['name'], - json['city'], - json['profesion'], - json['estado'], - avatar != null ? storage.ref().child(avatar) : null, - json['tarifa'] ?? 0); + json['name'], + json['city'], + json['profesion'], + json['estado'], + avatar != null ? storage.ref().child(avatar) : null, + json['tarifa'] ?? 0, + json['phoneNumber'], + json['token'], + ); } catch (e) { print('XD user $e'); - return UserModel('', '', '', null, null, 0); + return UserModel('', '', '', null, null, 0, '', ''); } } @@ -40,7 +45,7 @@ class UserModel { return fromJson(data, uid); } catch (e) { print('Error getting user: $e'); - return UserModel('', '', '', null, null, 0); + return UserModel('', '', '', null, null, 0, '', ''); } } } diff --git a/lib/src/screens/calendar.dart b/lib/src/screens/calendar.dart index efb525e..a7ab59b 100644 --- a/lib/src/screens/calendar.dart +++ b/lib/src/screens/calendar.dart @@ -55,6 +55,7 @@ class _CalendarScreenState extends State { _selectedTime2 = pickedTime2; }); } + return pickedTime2; } @@ -308,7 +309,7 @@ class _CalendarScreenState extends State { '$combinedDate1', '$combinedDate2', uid.toString(), - '', + 'sitio', '', 0, 0, diff --git a/lib/src/screens/chat.dart b/lib/src/screens/chat.dart index 4ec96d9..6e8ab17 100644 --- a/lib/src/screens/chat.dart +++ b/lib/src/screens/chat.dart @@ -78,7 +78,7 @@ class _ChatScreenState extends State { style: const TextStyle( color: Colors.black, fontWeight: FontWeight.w600), ), - subtitle: Text('${user?.profession}'), + subtitle: Text(user?.profession ?? ''), trailing: const Icon(Icons.keyboard_arrow_right), ), ), diff --git a/lib/src/screens/cita.dart b/lib/src/screens/cita.dart index ad3fda7..9dfb06d 100644 --- a/lib/src/screens/cita.dart +++ b/lib/src/screens/cita.dart @@ -3,13 +3,13 @@ import 'package:firebase_storage/firebase_storage.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_rating_bar/flutter_rating_bar.dart'; -import 'package:get/get.dart'; import 'package:intl/intl.dart'; import 'package:prosappco/src/authentication/authentication_repository.dart'; import 'package:prosappco/src/components/photo_view.dart'; import 'package:prosappco/src/components/pop_appbar.dart'; import 'package:prosappco/src/models/event_model.dart'; import 'package:prosappco/src/models/scores_model.dart'; +import 'package:prosappco/src/models/setting_model.dart'; import 'package:prosappco/src/models/user_model.dart'; import 'package:prosappco/src/screens/chat.dart'; import 'package:prosappco/src/screens/score.dart'; @@ -29,11 +29,11 @@ class _CitaScreenState extends State { UserModel? user; DateTime today = DateTime.now(); String nombre = ''; + String numberPhone = ''; int tarifa = 0; Reference? ref_photo; ScoresModel? scoresModel; - - final phoneNumber = '+573022548060'; + bool? ver = true; String formatCurrency(int number) { final formatter = @@ -51,7 +51,7 @@ class _CitaScreenState extends State { } } - Future _sendWhatsapp() async { + Future _sendWhatsapp(String phoneNumber) async { final whatsappUrl = 'https://wa.me/$phoneNumber?text=${Uri.parse('Hola! me contactaste por Prossapp')}'; if (!await launch(whatsappUrl)) { @@ -59,10 +59,19 @@ class _CitaScreenState extends State { } } + SettingModel? settings; @override void initState() { super.initState(); + if (settings == null) { + SettingModel.getSettings().then( + (SettingModel value) => setState(() { + settings = value; + }), + ); + } + if (scoresModel == null) { if (uid != widget.evento.userId) { ScoresModel.scoreTo(widget.evento.userId, false, false).then( @@ -83,7 +92,6 @@ class _CitaScreenState extends State { @override Widget build(BuildContext context) { today.difference(DateTime.parse(widget.evento.range1Hour1)); - // DateTime todays = DateFormat('hh:mm a').parse(today.timeZoneName); final eventDate = DateFormat('yyyy-MM-dd').parse(widget.evento.day); if (nombre == '') { @@ -91,18 +99,18 @@ class _CitaScreenState extends State { UserModel.getUser(widget.evento.userId).then((value) { UserModel.getUser(uid.toString()).then((me) { setState(() { - tarifa = me.tarifa ?? 0; nombre = value.name; ref_photo = value.photo; + numberPhone = value.phoneNumber ?? ''; }); }); }); } else { UserModel.getUser(widget.evento.professionalId).then((value) { setState(() { - tarifa = value.tarifa ?? 0; nombre = value.name; ref_photo = value.photo; + numberPhone = value.phoneNumber ?? ''; }); }); } @@ -211,17 +219,19 @@ class _CitaScreenState extends State { ], ), ), - Column( - children: [ - Text( - formatCurrency(tarifa), - style: const TextStyle( - fontWeight: FontWeight.w600, fontSize: 25), - ), - Text('Tarifa consulta ${widget.evento.tarifa}', - style: const TextStyle(fontSize: 15)), - ], - ), + settings?.tarifas == true && widget.evento.tarifa != 0 + ? Column( + children: [ + Text( + formatCurrency(widget.evento.tarifa ?? 0), + style: const TextStyle( + fontWeight: FontWeight.w600, fontSize: 25), + ), + const Text('Tarifa consulta', + style: TextStyle(fontSize: 15)), + ], + ) + : const SizedBox(), const SizedBox(height: 15), Text( textAlign: TextAlign.center, @@ -240,7 +250,7 @@ class _CitaScreenState extends State { children: [ const Expanded(child: SizedBox()), ElevatedButton( - onPressed: () => launch("tel:+573163225944"), + onPressed: () => launch("tel:$numberPhone"), style: ElevatedButton.styleFrom( foregroundColor: const Color(0xFF2BA4EC), backgroundColor: Colors.white, @@ -327,7 +337,7 @@ class _CitaScreenState extends State { const SizedBox(width: 20), ElevatedButton( onPressed: () { - _sendWhatsapp(); + _sendWhatsapp(numberPhone); }, style: ElevatedButton.styleFrom( foregroundColor: const Color(0xFF2BA4EC), @@ -401,10 +411,11 @@ class _CitaScreenState extends State { eventDate.month == today.month && eventDate.day == today.day ? (DateTime.now() - .difference( - DateTime.parse(widget.evento.range1Hour1)) - .abs() <= - const Duration(minutes: 30)) + .difference( + DateTime.parse(widget.evento.range1Hour1)) + .abs() <= + const Duration(minutes: 30) && + ver == true) ? Padding( padding: const EdgeInsets.only(bottom: 30), child: Column( @@ -416,7 +427,12 @@ class _CitaScreenState extends State { FirebaseFirestore.instance .collection("services") .doc('${widget.evento.id}') - .update({"status": "iniciado"}); + .update({"status": "iniciado"}).then( + (value) { + setState(() { + ver = false; + }); + }); }, style: ElevatedButton.styleFrom( backgroundColor: const Color(0xFF2BA4EC), @@ -536,7 +552,7 @@ class _CitaScreenState extends State { ), ) : const SizedBox(), - widget.evento.status == 'iniciado' + widget.evento.status == 'iniciado' || ver == false ? Padding( padding: const EdgeInsets.only(bottom: 30), child: Column( diff --git a/lib/src/screens/my_services_pro.dart b/lib/src/screens/my_services_pro.dart index 0488ea9..1b5071e 100644 --- a/lib/src/screens/my_services_pro.dart +++ b/lib/src/screens/my_services_pro.dart @@ -123,11 +123,17 @@ class _MyServicesProScreenState extends State { color: Colors.blue, size: 40, ) - : const Icon( - Icons.close, - color: Colors.red, - size: 40, - ), + : event.status == 'terminado' + ? const Icon( + Icons.rocket_launch, + color: Colors.blue, + size: 40, + ) + : const Icon( + Icons.close, + color: Colors.red, + size: 40, + ), title: RichText( text: TextSpan( children: [ diff --git a/lib/src/screens/professional.dart b/lib/src/screens/professional.dart index 402d134..1ff1016 100644 --- a/lib/src/screens/professional.dart +++ b/lib/src/screens/professional.dart @@ -3,9 +3,11 @@ import 'package:diacritic/diacritic.dart'; import 'package:firebase_storage/firebase_storage.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:intl/intl.dart'; import 'package:prosappco/src/authentication/authentication_repository.dart'; import 'package:prosappco/src/components/photo_view.dart'; import 'package:prosappco/src/components/pop_appbar.dart'; +import 'package:prosappco/src/models/setting_model.dart'; import 'package:prosappco/src/screens/professional_info.dart'; import '../models/scores_model.dart'; @@ -69,6 +71,7 @@ class Professional { ' latitude: $latitude,\n' ' longitude: $longitude,\n' ' professionalEspecializado: ${getEspecializaciones()}\n' + ' tarifa: $tarifa,\n' '}'; } @@ -114,6 +117,12 @@ class Professional { } class _ProfessionalScreenState extends State { + String formatCurrency(int number) { + final formatter = + NumberFormat.currency(locale: 'es_CO', decimalDigits: 0, symbol: ''); + return '\$${formatter.format(number)}'; + } + Future _showChoiceDialog(BuildContext context) async { String? selectedOption = await showDialog( context: context, @@ -193,6 +202,7 @@ class _ProfessionalScreenState extends State { latitude: data['latitude'] ?? 0, longitude: data['longitude'] ?? 0, scores: await ScoresModel.scoreTo(user.id, true, true), + tarifa: data['tarifa'] ?? 0, ); professionals.add(professional); } @@ -206,10 +216,19 @@ class _ProfessionalScreenState extends State { return professionals; } + SettingModel? settings; + @override void initState() { super.initState(); + if (settings == null) { + SettingModel.getSettings().then( + (SettingModel value) => setState(() { + settings = value; + }), + ); + } searchController.addListener(() { setState(() { if (_professionals != null) { @@ -250,121 +269,148 @@ class _ProfessionalScreenState extends State { var professionals = filteredProfessionals!; return SafeArea( - child: Scaffold( - appBar: PopAppbar( - onPressed: () { - Navigator.pop(context); - }, - label: 'Seleccione un profesional'), - body: Column( - children: [ - Padding( - padding: const EdgeInsets.all(10), - child: TextField( - controller: searchController, - decoration: const InputDecoration( - hintText: 'Escriba un nombre', - prefixIcon: Icon(Icons.assignment_ind_rounded), + child: Scaffold( + appBar: PopAppbar( + onPressed: () { + Navigator.pop(context); + }, + label: 'Seleccione un profesional'), + body: Column( + children: [ + Padding( + padding: const EdgeInsets.all(10), + child: TextField( + controller: searchController, + decoration: const InputDecoration( + hintText: 'Escriba un nombre', + prefixIcon: Icon(Icons.assignment_ind_rounded), + ), ), ), - ), - Expanded( - child: ListView.builder( - itemCount: professionals.length, - itemBuilder: (BuildContext context, int index) { - return ListTile( - leading: GestureDetector( - onTap: () { - Navigator.of(context).push( - CupertinoPageRoute( - builder: (BuildContext context) { - return ProfessionalInfoScreen( - professional: professionals[index], - ); - }, - ), - ); - }, - child: ReferencePhoto( - ref: professionals[index].professionalRef, - sizeCircle: 50, - size: 50, - sizeIcon: 35, - ), - ), - trailing: GestureDetector( - child: const Icon(Icons.keyboard_arrow_right), - onTap: () { - Navigator.of(context).push( - CupertinoPageRoute( - builder: (BuildContext context) { - return ProfessionalInfoScreen( - professional: professionals[index], - ); - }, - ), - ); - }, - ), - title: RichText( - text: TextSpan( - style: const TextStyle( - fontSize: 15.0, - color: Colors.black, + Expanded( + child: ListView.builder( + itemCount: professionals.length, + itemBuilder: (BuildContext context, int index) { + return ListTile( + leading: GestureDetector( + onTap: () { + Navigator.of(context).push( + CupertinoPageRoute( + builder: (BuildContext context) { + return ProfessionalInfoScreen( + professional: professionals[index], + ); + }, + ), + ); + }, + child: ReferencePhoto( + ref: professionals[index].professionalRef, + sizeCircle: 50, + size: 50, + sizeIcon: 35, ), - children: [ - TextSpan( - text: '${professionals[index].name}, ', - style: const TextStyle(fontWeight: FontWeight.bold), - ), - TextSpan( - text: - "${professionals[index].professionName}, ${professionals[index].cityName}", - style: TextStyle(color: Colors.grey[600]), + ), + trailing: GestureDetector( + child: const Icon(Icons.keyboard_arrow_right), + onTap: () { + Navigator.of(context).push( + CupertinoPageRoute( + builder: (BuildContext context) { + return ProfessionalInfoScreen( + professional: professionals[index], + ); + }, + ), + ); + }, + ), + title: RichText( + text: TextSpan( + style: const TextStyle( + fontSize: 15.0, + color: Colors.black, ), + children: [ + TextSpan( + text: '${professionals[index].name}, ', + style: const TextStyle(fontWeight: FontWeight.bold), + ), + TextSpan( + text: + "${professionals[index].professionName}, ${professionals[index].cityName}", + style: TextStyle(color: Colors.grey[600]), + ), + ], + ), + ), + subtitle: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + settings?.tarifas == true + ? professionals[index].tarifa == 0 + ? const SizedBox() + : Container( + padding: const EdgeInsets.symmetric( + horizontal: 10, vertical: 5), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(20.0), + color: const Color(0xFFD6F4FF), + ), + child: Text( + formatCurrency( + professionals[index].tarifa ?? 0), + style: TextStyle( + color: Colors.grey[850], + fontWeight: FontWeight.w600, + ), + ), + ) + : const SizedBox(), + professionals[index].ubicacion == 'ambos' + ? Text( + 'Disponibilidad a domicilio y en sitio ${professionals[index].tarifa}', + style: const TextStyle( + color: Colors.blue, + ), + ) + : professionals[index].ubicacion == 'sitio' + ? Text( + 'Disponibilidad en ${professionals[index].ubicacion} ', + style: const TextStyle( + color: Colors.blue, + ), + ) + : Text( + 'Disponibilidad a ${professionals[index].ubicacion}', + style: const TextStyle( + color: Colors.blue, + ), + ), ], ), - ), - subtitle: professionals[index].ubicacion == 'ambos' - ? const Text( - 'Disponibilidad a domicilio y en sitio', - style: TextStyle( - color: Colors.blue, - ), - ) - : professionals[index].ubicacion == 'sitio' - ? Text( - 'Disponibilidad en ${professionals[index].ubicacion}', - style: const TextStyle( - color: Colors.blue, - ), - ) - : Text( - 'Disponibilidad a ${professionals[index].ubicacion}', - style: const TextStyle( - color: Colors.blue, - ), - ), - onTap: () { - if (professionals[index].ubicacion == 'ambos') { - _showChoiceDialog(context).then((String? value) { - if (value != null) { - Navigator.pop(context, [professionals[index], value]); - } - }); - } else if (professionals[index].ubicacion == 'sitio') { - Navigator.pop(context, [professionals[index], 'sitio']); - } else { - Navigator.pop( - context, [professionals[index], 'domicilio']); - } - }, - ); - }, + onTap: () { + if (professionals[index].ubicacion == 'ambos') { + _showChoiceDialog(context).then((String? value) { + if (value != null) { + Navigator.pop( + context, [professionals[index], value]); + } + }); + } else if (professionals[index].ubicacion == 'sitio') { + Navigator.pop(context, [professionals[index], 'sitio']); + } else { + Navigator.pop( + context, [professionals[index], 'domicilio']); + } + }, + ); + }, + ), ), - ), - ], + ], + ), ), - )); + ); } } diff --git a/lib/src/screens/professional_info.dart b/lib/src/screens/professional_info.dart index abd78de..e0f56de 100644 --- a/lib/src/screens/professional_info.dart +++ b/lib/src/screens/professional_info.dart @@ -1,8 +1,10 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_rating_bar/flutter_rating_bar.dart'; +import 'package:intl/intl.dart'; import 'package:prosappco/src/components/photo_view.dart'; import 'package:prosappco/src/components/pop_appbar.dart'; +import 'package:prosappco/src/models/setting_model.dart'; import 'package:prosappco/src/screens/professional.dart'; import 'package:prosappco/src/screens/reputation.dart'; @@ -18,9 +20,24 @@ class ProfessionalInfoScreen extends StatefulWidget { } class _ProfessionalInfoScreenState extends State { + SettingModel? settings; + + String formatCurrency(int number) { + final formatter = + NumberFormat.currency(locale: 'es_CO', decimalDigits: 0, symbol: ''); + return '\$${formatter.format(number)}'; + } + @override void initState() { super.initState(); + if (settings == null) { + SettingModel.getSettings().then( + (SettingModel value) => setState(() { + settings = value; + }), + ); + } } @override @@ -116,6 +133,30 @@ class _ProfessionalInfoScreenState extends State { ) : const SizedBox(), const SizedBox(height: 10), + settings?.tarifas == true + ? RichText( + text: TextSpan( + children: [ + const TextSpan( + text: 'Tarifa consulta ', + style: TextStyle( + color: Colors.black, + ), + ), + TextSpan( + text: formatCurrency( + widget.professional.tarifa ?? 0), + style: const TextStyle( + color: Colors.black, + fontSize: 16, + fontWeight: FontWeight.w600, + ), + ), + ], + ), + ) + : const SizedBox(), + const SizedBox(height: 10), const Text( 'Se unió el 02 de abril del 2023', style: TextStyle(fontSize: 12), @@ -138,7 +179,7 @@ class _ProfessionalInfoScreenState extends State { Navigator.of(context).push( CupertinoPageRoute( builder: (BuildContext context) { - return ReputationScreen(); + return const ReputationScreen(); }, ), ); diff --git a/lib/src/screens/profile.dart b/lib/src/screens/profile.dart index 97897d3..5caf891 100644 --- a/lib/src/screens/profile.dart +++ b/lib/src/screens/profile.dart @@ -213,6 +213,7 @@ class _ProfileScreenState extends State { Future updateInfo() async { final currentUser = _auth.currentUser; + final currentPhoneNumber = _auth.currentUser!.phoneNumber; String newName = _nameController.text.trim(); String newEmail = _emailController.text.trim(); @@ -262,6 +263,15 @@ class _ProfileScreenState extends State { } } + try { + await FirebaseFirestore.instance + .collection('users') + .doc(uid) + .update({'phoneNumber': currentPhoneNumber}); + } catch (e) { + print('e'); + } + try { if (imagen_to_upload == null) { return; diff --git a/lib/src/screens/service.dart b/lib/src/screens/service.dart index 5f6c290..6d3e5a7 100644 --- a/lib/src/screens/service.dart +++ b/lib/src/screens/service.dart @@ -35,7 +35,7 @@ class _ServiceScreenState extends State { final _serviceTypeController = TextEditingController(); final _observacionController = TextEditingController(); String professionalId = ''; - int professionalTarifa = 0; + int? professionalTarifa; String professionalAddress = ''; String professionalUbicacion = ''; double? professionalLatitude; @@ -138,9 +138,21 @@ class _ServiceScreenState extends State { @override void initState() { super.initState(); + final String token = '50002'; + + final userRef = FirebaseFirestore.instance.collection('users').doc(uid); + + userRef.get().then((docSnapshot) { + if (docSnapshot.exists) { + userRef.update({'token': token}); + } else { + userRef.set({'token': token}, SetOptions(merge: true)); + } + }); BitmapDescriptor.fromAssetImage( - ImageConfiguration(size: Size(48, 48)), 'images/pro_marke.png') + const ImageConfiguration(size: Size(48, 48)), + 'images/pro_marke.png') .then((icon) { setState(() { _markerIcon = icon; @@ -582,7 +594,9 @@ class _ServiceScreenState extends State { ? coordinates.longitude : professionalLongitude, 'pendiente', - professionalTarifa, + professionalTarifa == 0 + ? 0 + : professionalTarifa, ) .then((value) { Navigator.pushReplacement( @@ -615,6 +629,7 @@ class _ServiceScreenState extends State { ), ), ), + Text('${_selectedDate?.weekday}') ], ), ), diff --git a/lib/src/screens/service_after.dart b/lib/src/screens/service_after.dart index b94a31f..8244b24 100644 --- a/lib/src/screens/service_after.dart +++ b/lib/src/screens/service_after.dart @@ -1,6 +1,3 @@ -import 'dart:developer'; - -import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_rating_bar/flutter_rating_bar.dart'; @@ -9,9 +6,8 @@ import 'package:prosappco/src/components/photo_view.dart'; import 'package:prosappco/src/components/pop_appbar.dart'; import 'package:prosappco/src/models/event_model.dart'; import 'package:prosappco/src/models/scores_model.dart'; +import 'package:prosappco/src/models/setting_model.dart'; import 'package:prosappco/src/models/user_model.dart'; -import 'package:prosappco/src/screens/profile.dart'; -import 'package:prosappco/src/screens/profile_pro.dart'; import 'package:prosappco/src/screens/service.dart'; class ServiceAfterScreen extends StatefulWidget { @@ -26,11 +22,20 @@ class _ServiceAfterScreenState extends State { Event? evento; UserModel? user; ScoresModel? scoresModel; + SettingModel? settings; @override void initState() { super.initState(); + if (settings == null) { + SettingModel.getSettings().then( + (SettingModel value) => setState(() { + settings = value; + }), + ); + } + Event.getEventById(widget.eventoId).then((value) { setState(() { evento = value; @@ -50,6 +55,12 @@ class _ServiceAfterScreenState extends State { }); } + String formatCurrency(int number) { + final formatter = + NumberFormat.currency(locale: 'es_CO', decimalDigits: 0, symbol: ''); + return '\$${formatter.format(number)}'; + } + @override Widget build(BuildContext context) { return Scaffold( @@ -93,7 +104,11 @@ class _ServiceAfterScreenState extends State { ), ), TextSpan( - text: ' ${evento?.range1Hour1}', + text: evento?.range1Hour1 != null + ? TimeOfDay.fromDateTime( + DateTime.parse(evento!.range1Hour1)) + .format(context) + : '', style: const TextStyle( color: Colors.grey, fontSize: 16, @@ -124,7 +139,7 @@ class _ServiceAfterScreenState extends State { ), const SizedBox(width: 5), Text( - '(${scoresModel?.total.toString()}) ${scoresModel?.average.toString()}'), + '(${scoresModel?.total.toString()}) ${scoresModel?.average.toStringAsFixed(1)}'), ], ), ], @@ -166,6 +181,17 @@ class _ServiceAfterScreenState extends State { ], ), ), + settings?.tarifas == true && evento?.tarifa != 0 + ? Column(children: [ + Text( + formatCurrency(evento?.tarifa ?? 0), + style: const TextStyle( + fontWeight: FontWeight.w600, fontSize: 25), + ), + const Text('Tarifa consulta'), + const SizedBox(height: 10) + ]) + : const SizedBox(), ListTile( leading: const Icon(Icons.near_me), title: Text( diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index 2ef86b8..486af8f 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -10,6 +10,7 @@ import firebase_auth import firebase_core import firebase_messaging import firebase_storage +import flutter_local_notifications import geolocator_apple import url_launcher_macos @@ -19,6 +20,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin")) FLTFirebaseMessagingPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseMessagingPlugin")) FLTFirebaseStoragePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseStoragePlugin")) + FlutterLocalNotificationsPlugin.register(with: registry.registrar(forPlugin: "FlutterLocalNotificationsPlugin")) GeolocatorPlugin.register(with: registry.registrar(forPlugin: "GeolocatorPlugin")) UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) } diff --git a/pubspec.lock b/pubspec.lock index 379a90f..9d5d44d 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -9,6 +9,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.0" + args: + dependency: transitive + description: + name: args + sha256: c372bb384f273f0c2a8aaaa226dad84dc27c8519a691b888725dec59518ad53a + url: "https://pub.dev" + source: hosted + version: "2.4.1" async: dependency: transitive description: @@ -97,6 +105,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.5" + dbus: + dependency: transitive + description: + name: dbus + sha256: "6f07cba3f7b3448d42d015bfd3d53fe12e5b36da2423f23838efc1d5fb31a263" + url: "https://pub.dev" + source: hosted + version: "0.7.8" diacritic: dependency: "direct main" description: @@ -113,6 +129,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.1" + ffi: + dependency: transitive + description: + name: ffi + sha256: ed5337a5660c506388a9f012be0288fb38b49020ce2b45fe1f8b8323fe429f99 + url: "https://pub.dev" + source: hosted + version: "2.0.2" + file: + dependency: transitive + description: + name: file + sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" + url: "https://pub.dev" + source: hosted + version: "6.1.4" firebase_auth: dependency: "direct main" description: @@ -238,6 +270,30 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.1" + flutter_local_notifications: + dependency: "direct main" + description: + name: flutter_local_notifications + sha256: "2876372952b65ca7f684e698eba22bda1cf581fa071dd30ba2f01900f507d0d1" + url: "https://pub.dev" + source: hosted + version: "14.0.0+1" + flutter_local_notifications_linux: + dependency: transitive + description: + name: flutter_local_notifications_linux + sha256: "909bb95de05a2e793503a2437146285a2f600cd0b3f826e26b870a334d8586d7" + url: "https://pub.dev" + source: hosted + version: "4.0.0" + flutter_local_notifications_platform_interface: + dependency: transitive + description: + name: flutter_local_notifications_platform_interface + sha256: "63235c42de5b6c99846969a27ad0209c401e6b77b0498939813725b5791c107c" + url: "https://pub.dev" + source: hosted + version: "7.0.0" flutter_otp_text_field: dependency: "direct main" description: @@ -576,6 +632,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.8.2" + petitparser: + dependency: transitive + description: + name: petitparser + sha256: "49392a45ced973e8d94a85fdb21293fbb40ba805fc49f2965101ae748a3683b4" + url: "https://pub.dev" + source: hosted + version: "5.1.0" + platform: + dependency: transitive + description: + name: platform + sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76" + url: "https://pub.dev" + source: hosted + version: "3.1.0" plugin_platform_interface: dependency: transitive description: @@ -584,6 +656,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + process: + dependency: transitive + description: + name: process + sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09" + url: "https://pub.dev" + source: hosted + version: "4.2.4" provider: dependency: "direct main" description: @@ -677,6 +757,14 @@ packages: url: "https://pub.dev" source: hosted version: "0.4.16" + timezone: + dependency: transitive + description: + name: timezone + sha256: "1cfd8ddc2d1cfd836bc93e67b9be88c3adaeca6f40a00ca999104c30693cdca0" + url: "https://pub.dev" + source: hosted + version: "0.9.2" typed_data: dependency: transitive description: @@ -789,6 +877,22 @@ packages: url: "https://pub.dev" source: hosted version: "3.4.2" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + sha256: ee1505df1426458f7f60aac270645098d318a8b4766d85fde75f76f2e21807d1 + url: "https://pub.dev" + source: hosted + version: "1.0.0" + xml: + dependency: transitive + description: + name: xml + sha256: "979ee37d622dec6365e2efa4d906c37470995871fe9ae080d967e192d88286b5" + url: "https://pub.dev" + source: hosted + version: "6.2.2" sdks: dart: ">=2.19.3 <3.0.0" flutter: ">=3.3.0" diff --git a/pubspec.yaml b/pubspec.yaml index 0682bed..934cb52 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -47,7 +47,6 @@ dependencies: intl_phone_field: cloud_firestore: diacritic: - firebase_storage: image_picker: flutter_animate: flutter_rating_bar: @@ -60,8 +59,10 @@ dependencies: community_material_icon: ^5.9.55 flutter_email_sender: ^5.2.0 webview_flutter: ^4.2.0 + firebase_storage: firebase_messaging: ^14.5.0 - + flutter_local_notifications: ^14.0.0+1 + dev_dependencies: flutter_test: sdk: flutter