antes de notificaciones

This commit is contained in:
Juan Felipe Duarte
2023-05-11 09:35:12 -05:00
parent 40ee4f2ab2
commit d5702207d2
14 changed files with 438 additions and 164 deletions
+18 -3
View File
@@ -35,7 +35,7 @@ class _ServiceScreenState extends State<ServiceScreen> {
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<ServiceScreen> {
@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<ServiceScreen> {
? coordinates.longitude
: professionalLongitude,
'pendiente',
professionalTarifa,
professionalTarifa == 0
? 0
: professionalTarifa,
)
.then((value) {
Navigator.pushReplacement(
@@ -615,6 +629,7 @@ class _ServiceScreenState extends State<ServiceScreen> {
),
),
),
Text('${_selectedDate?.weekday}')
],
),
),