update
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -8,6 +8,7 @@ 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/controllers/info_%20professional.dart';
|
||||
import 'package:prosappco/src/presentation/widgets/shared/warning_snackbar.dart';
|
||||
import 'package:prosappco/src/services/select_image_profile.dart';
|
||||
import 'package:file_picker/file_picker.dart';
|
||||
|
||||
@@ -187,7 +188,7 @@ class ProfessionalProfileScreenState extends State<ProfessionalProfileScreen> {
|
||||
Reference ref =
|
||||
storage.ref().child('users').child(uid!).child('cedula').child(random);
|
||||
|
||||
final UploadTask uploadTask = ref.putFile(image);
|
||||
final UploadTask uploadTask = ref.putFile(image, metadata);
|
||||
|
||||
final TaskSnapshot snapshot = await uploadTask.whenComplete(() => true);
|
||||
|
||||
@@ -217,6 +218,10 @@ class ProfessionalProfileScreenState extends State<ProfessionalProfileScreen> {
|
||||
}
|
||||
}
|
||||
|
||||
final metadata = SettableMetadata(
|
||||
contentType: 'application/pdf',
|
||||
);
|
||||
|
||||
Future<bool> uploadCertificado(File image) async {
|
||||
final now = DateTime.now();
|
||||
final formattedDate = DateFormat('HHmmssddMMyyyy').format(now);
|
||||
@@ -230,7 +235,7 @@ class ProfessionalProfileScreenState extends State<ProfessionalProfileScreen> {
|
||||
.child('certificado_profesional')
|
||||
.child(random);
|
||||
|
||||
final UploadTask uploadTask = ref.putFile(image);
|
||||
final UploadTask uploadTask = ref.putFile(image, metadata);
|
||||
|
||||
final TaskSnapshot snapshot = await uploadTask.whenComplete(() => true);
|
||||
|
||||
@@ -281,24 +286,31 @@ class ProfessionalProfileScreenState extends State<ProfessionalProfileScreen> {
|
||||
}
|
||||
|
||||
Future<bool> uploadImage(File image) async {
|
||||
final String namefile = image.path.split('/').last;
|
||||
try {
|
||||
final String namefile = image.path.split('/').last;
|
||||
|
||||
Reference ref = storage
|
||||
.ref()
|
||||
.child('users')
|
||||
.child(uid!)
|
||||
.child('profile')
|
||||
.child(namefile);
|
||||
Reference ref = storage
|
||||
.ref()
|
||||
.child('users')
|
||||
.child(uid!)
|
||||
.child('profile')
|
||||
.child(namefile);
|
||||
|
||||
final UploadTask uploadTask = ref.putFile(image);
|
||||
final UploadTask uploadTask = ref.putFile(image);
|
||||
|
||||
final TaskSnapshot snapshot = await uploadTask.whenComplete(() => true);
|
||||
final TaskSnapshot snapshot = await uploadTask;
|
||||
|
||||
photoTemp = ref.fullPath;
|
||||
if (snapshot.state == TaskState.success) {
|
||||
// Obtén la URL de descarga de la imagen y actualiza en Firestore
|
||||
String downloadURL = await ref.getDownloadURL();
|
||||
await updateImage(downloadURL);
|
||||
|
||||
if (snapshot.state == TaskState.success) {
|
||||
return true;
|
||||
} else {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} catch (e) {
|
||||
print('Error al cargar la imagen: $e');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -361,7 +373,7 @@ class ProfessionalProfileScreenState extends State<ProfessionalProfileScreen> {
|
||||
.child('especializaciones')
|
||||
.child('e${DateTime.now().millisecondsSinceEpoch}.pdf');
|
||||
|
||||
final UploadTask uploadTask = ref.putFile(image);
|
||||
final UploadTask uploadTask = ref.putFile(image, metadata);
|
||||
|
||||
final TaskSnapshot snapshot = await uploadTask.whenComplete(() => true);
|
||||
|
||||
@@ -419,22 +431,47 @@ class ProfessionalProfileScreenState extends State<ProfessionalProfileScreen> {
|
||||
especializacion.split(',').map((e) => e.trim()).toList();
|
||||
|
||||
if (cedula.isEmpty) {
|
||||
_showCustomSnackBar(
|
||||
context, 'Por favor, adjunta el documento PDF de tu cédula.');
|
||||
WarningSnackbar.show(
|
||||
title: 'Te faltan campos!!',
|
||||
message: 'Por favor, ingresa tu cedula',
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
if (image_cedula == null) {
|
||||
_showCustomSnackBar(
|
||||
context, 'Por favor, adjunte el documento PDF de su cédula.');
|
||||
WarningSnackbar.show(
|
||||
title: 'Te faltan archivos!!',
|
||||
message: 'Por favor, adjunta el documento PDF de tu cedula',
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
if (_profession.isEmpty) {
|
||||
WarningSnackbar.show(
|
||||
title: 'Te falta elegir una profesión!!',
|
||||
message:
|
||||
'Por favor, elige tu profesión antes de enviar la información.',
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
if (image_certificado == null) {
|
||||
_showCustomSnackBar(context,
|
||||
'Por favor, adjunta el documento PDF de tu certificado. ¡Gracias por tu colaboración!');
|
||||
WarningSnackbar.show(
|
||||
title: 'Te faltan archivos!!',
|
||||
message: 'Por favor, adjunta el documento PDF de tu certificado',
|
||||
);
|
||||
return;
|
||||
}
|
||||
if (imagen_to_upload == null) {
|
||||
WarningSnackbar.show(
|
||||
title: 'Sube una foto de perfil',
|
||||
message: 'Para continuar debes subir una imagen de perfil',
|
||||
);
|
||||
return;
|
||||
} else {
|
||||
// Actualiza la imagen de perfil si hay cambios
|
||||
updateImage(photoTemp);
|
||||
}
|
||||
|
||||
// Actualiza los datos del usuario en Firestore
|
||||
await FirebaseFirestore.instance.collection('users').doc(uid).update({
|
||||
@@ -448,11 +485,6 @@ class ProfessionalProfileScreenState extends State<ProfessionalProfileScreen> {
|
||||
uploadCertificado(image_certificado!);
|
||||
uploadEspecializaciones(images_especializacion);
|
||||
|
||||
// Actualiza la imagen de perfil si hay cambios
|
||||
if (imagen_to_upload != null) {
|
||||
updateImage(photoTemp);
|
||||
}
|
||||
// Navega a la siguiente pantalla
|
||||
Navigator.pushReplacementNamed(context, '/solicitudEnviada');
|
||||
}
|
||||
|
||||
|
||||
@@ -13,9 +13,13 @@ import 'package:prosappco/src/presentation/widgets/profile/birth_date_picker.dar
|
||||
import 'package:prosappco/src/presentation/screens/city.dart';
|
||||
import 'package:prosappco/src/presentation/screens/new_number.dart';
|
||||
import 'package:prosappco/src/presentation/screens/new_password.dart';
|
||||
import 'package:prosappco/src/presentation/widgets/shared/primary_checkbox.dart';
|
||||
import 'package:prosappco/src/presentation/widgets/shared/warning_snackbar.dart';
|
||||
import 'package:prosappco/src/providers/user_provider.dart';
|
||||
import 'package:prosappco/src/services/select_image_profile.dart';
|
||||
import 'package:prosappco/src/presentation/widgets/profile/gender_dropdown.dart';
|
||||
import 'package:prosappco/src/presentation/widgets/shared/primary_button.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import '../../../components/photo_view.dart';
|
||||
|
||||
class ProfileScreen extends StatefulWidget {
|
||||
@@ -275,13 +279,15 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
return;
|
||||
}
|
||||
|
||||
if (newEmail.isEmpty) {
|
||||
Get.snackbar(
|
||||
'Correo Invalido',
|
||||
'Ingresa un email válido.',
|
||||
snackPosition: SnackPosition.BOTTOM,
|
||||
);
|
||||
return;
|
||||
if (enableLoginWithEmail) {
|
||||
if (newEmail.isEmpty) {
|
||||
Get.snackbar(
|
||||
'Correo Invalido',
|
||||
'Ingresa un email válido.',
|
||||
snackPosition: SnackPosition.BOTTOM,
|
||||
);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (currentUser?.displayName != newName) {
|
||||
@@ -296,18 +302,29 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
}
|
||||
}
|
||||
|
||||
if (currentUser?.email != newEmail) {
|
||||
if (newPassword.isNotEmpty) {
|
||||
await FirebaseFirestore.instance.collection('users').doc(uid).update({
|
||||
'email': newEmail,
|
||||
});
|
||||
updateEmailAndPassword(newEmail, newPassword);
|
||||
} else {
|
||||
Get.snackbar(
|
||||
'Contraseña Invalida',
|
||||
'Porfavor ingresa una contraseña.',
|
||||
snackPosition: SnackPosition.BOTTOM,
|
||||
);
|
||||
if (enableLoginWithEmail) {
|
||||
if (currentUser?.email != newEmail) {
|
||||
if (newPassword.isNotEmpty) {
|
||||
bool updateEmailSuccess =
|
||||
await updateEmailAndPassword(newEmail, newPassword);
|
||||
|
||||
if (updateEmailSuccess) {
|
||||
await FirebaseFirestore.instance
|
||||
.collection('users')
|
||||
.doc(uid)
|
||||
.update({
|
||||
'email': newEmail,
|
||||
});
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
Get.snackbar(
|
||||
'Contraseña Invalida',
|
||||
'Por favor ingresa una contraseña.',
|
||||
snackPosition: SnackPosition.BOTTOM,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -320,18 +337,8 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
print('e');
|
||||
}
|
||||
|
||||
try {
|
||||
await FirebaseFirestore.instance
|
||||
.collection('users')
|
||||
.doc(uid)
|
||||
.update({'email': newEmail});
|
||||
} catch (e) {
|
||||
print('Error al actualizar la imagen de perfil $e');
|
||||
}
|
||||
|
||||
try {
|
||||
if (imagen_to_upload == null) {
|
||||
return;
|
||||
} else {
|
||||
final uploaded = await uploadImage(imagen_to_upload!);
|
||||
updateImage(photoTemp);
|
||||
@@ -341,10 +348,14 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
print('Error al actualizar la imagen de perfil $e');
|
||||
}
|
||||
|
||||
Get.snackbar(
|
||||
'Informacion actualizada',
|
||||
'Tu informacion ha sido actualizada con exito.',
|
||||
snackPosition: SnackPosition.BOTTOM,
|
||||
WarningSnackbar.show(
|
||||
title: 'Informacion actualizada',
|
||||
message: 'Tu informacion ha sido actualizada con exito.',
|
||||
icon: const Icon(
|
||||
Icons.check,
|
||||
color: Colors.white,
|
||||
),
|
||||
backgroundColor: Colors.green,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -401,19 +412,23 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
_email = newEmail;
|
||||
});
|
||||
|
||||
Get.snackbar(
|
||||
'Éxito',
|
||||
'Correo electrónico actualizado correctamente.',
|
||||
snackPosition: SnackPosition.BOTTOM,
|
||||
WarningSnackbar.show(
|
||||
title: 'Actualizado exitosamente',
|
||||
message: 'Correo electronico actualizado correctamente.',
|
||||
icon: const Icon(Icons.check, color: Colors.white),
|
||||
backgroundColor: Colors.green,
|
||||
);
|
||||
|
||||
Navigator.of(context).pop();
|
||||
if (Navigator.canPop(context)) {
|
||||
Navigator.of(context).pop();
|
||||
}
|
||||
} catch (e) {
|
||||
Get.snackbar(
|
||||
'No se pudo actualizar el correo',
|
||||
'Verifica tu contraseña actual y asegúrate de que el nuevo correo electrónico no se haya utilizado previamente.',
|
||||
snackPosition: SnackPosition.BOTTOM,
|
||||
WarningSnackbar.show(
|
||||
title: 'No se pudo actualizar el correo',
|
||||
message:
|
||||
'Verifica tu contraseña actual y asegúrate de que el nuevo correo electrónico no se haya utilizado previamente.',
|
||||
);
|
||||
|
||||
print('Error al actualizar el correo electrónico: $e');
|
||||
}
|
||||
}
|
||||
@@ -472,23 +487,26 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> updateEmailAndPassword(String email, String password) async {
|
||||
Future<bool> updateEmailAndPassword(String email, String password) async {
|
||||
final User? user = FirebaseAuth.instance.currentUser;
|
||||
if (user != null) {
|
||||
try {
|
||||
await user.updateEmail(email);
|
||||
await user.updatePassword(password);
|
||||
|
||||
return true;
|
||||
} catch (e) {
|
||||
Get.snackbar(
|
||||
'Agregar correo',
|
||||
'Inicia sesión para asegurarnos de que seas tú.',
|
||||
snackPosition: SnackPosition.BOTTOM,
|
||||
);
|
||||
// AuthenticationRepository.instance.logout(uid!);
|
||||
WarningSnackbar.show(
|
||||
title: 'Inicia sesión de nuevo',
|
||||
message:
|
||||
'Para agregar un correo debes haber iniciado sesión recientemente.');
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool enableLoginWithEmail = false;
|
||||
|
||||
Future<void> _showChoiceDialog(BuildContext context) async {
|
||||
return showDialog(
|
||||
context: context,
|
||||
@@ -538,6 +556,8 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
Widget build(BuildContext context) {
|
||||
String city = _ciudad.toString();
|
||||
|
||||
final userProvider = Provider.of<UserProvider>(context);
|
||||
|
||||
return Scaffold(
|
||||
appBar: PopAppbar(
|
||||
onPressed: () {
|
||||
@@ -582,70 +602,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
prefixIcon: Icon(Icons.person_outline),
|
||||
hintText: 'Nombre (Obligatorio)'),
|
||||
),
|
||||
const SizedBox(height: 0),
|
||||
_email != null
|
||||
? TextFormField(
|
||||
onTap: () {
|
||||
_showEmailUpdateDialog(context);
|
||||
},
|
||||
readOnly: true,
|
||||
controller: _emailController,
|
||||
decoration: const InputDecoration(
|
||||
prefixIcon: Icon(Icons.email_outlined),
|
||||
hintText: 'Email (Obligatorio)'),
|
||||
)
|
||||
: TextFormField(
|
||||
controller: _emailController,
|
||||
validator: (String? value) {
|
||||
if (value == null || value.isEmpty) {
|
||||
return 'Por favor ingrese un email';
|
||||
}
|
||||
final RegExp emailRegExp =
|
||||
RegExp(r'^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$');
|
||||
if (!emailRegExp.hasMatch(value)) {
|
||||
return 'Por favor ingrese un email válido';
|
||||
}
|
||||
return null;
|
||||
},
|
||||
decoration: const InputDecoration(
|
||||
prefixIcon: Icon(Icons.email_outlined),
|
||||
hintText: 'Email (Obligatorio)'),
|
||||
),
|
||||
const SizedBox(height: 20.0),
|
||||
_email != null
|
||||
? const SizedBox.shrink()
|
||||
: TextFormField(
|
||||
controller: _passwordController,
|
||||
obscureText: _obscureText,
|
||||
validator: (value) {
|
||||
if (value == null || value.isEmpty) {
|
||||
return 'Porfavor ingrese una contraseña.';
|
||||
}
|
||||
if (value.length < 5) {
|
||||
return 'Debe tener al menos 5 caracteres.';
|
||||
}
|
||||
return null;
|
||||
},
|
||||
decoration: InputDecoration(
|
||||
prefixIcon: const Icon(Icons.lock_outline),
|
||||
suffixIcon: IconButton(
|
||||
icon: Icon(
|
||||
_obscureText
|
||||
? Icons.visibility
|
||||
: Icons.visibility_off,
|
||||
color: Colors.grey,
|
||||
),
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
_obscureText = !_obscureText;
|
||||
});
|
||||
},
|
||||
),
|
||||
hintText: 'Contraseña (Obligatorio)'),
|
||||
),
|
||||
_email != null
|
||||
? const SizedBox.shrink()
|
||||
: const SizedBox(height: 20.0),
|
||||
const SizedBox(),
|
||||
TextFormField(
|
||||
readOnly: true,
|
||||
onTap: () async {
|
||||
@@ -719,6 +676,111 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
),
|
||||
)
|
||||
: const SizedBox(),
|
||||
_email != null
|
||||
? TextFormField(
|
||||
onTap: () {
|
||||
_showEmailUpdateDialog(context);
|
||||
},
|
||||
readOnly: true,
|
||||
controller: _emailController,
|
||||
decoration: const InputDecoration(
|
||||
prefixIcon: Icon(Icons.email_outlined),
|
||||
hintText: 'Email (Obligatorio)'),
|
||||
)
|
||||
: const SizedBox(),
|
||||
const SizedBox(height: 20),
|
||||
_email == null
|
||||
? PrimaryCheckbox(
|
||||
text:
|
||||
'Habilitar inicio de sesión con correo (Opcional)',
|
||||
initialValue: enableLoginWithEmail,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
enableLoginWithEmail = value;
|
||||
});
|
||||
},
|
||||
)
|
||||
: const SizedBox(),
|
||||
const SizedBox(height: 15),
|
||||
enableLoginWithEmail
|
||||
? Container(
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
color: Colors.blue,
|
||||
width: 0.5,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
padding: const EdgeInsets.all(10),
|
||||
child: Column(
|
||||
children: [
|
||||
TextFormField(
|
||||
controller: _emailController,
|
||||
validator: (String? value) {
|
||||
if (enableLoginWithEmail) {
|
||||
if (value == null || value.isEmpty) {
|
||||
return 'Por favor ingrese un email';
|
||||
}
|
||||
final RegExp emailRegExp = RegExp(
|
||||
r'^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$');
|
||||
if (!emailRegExp.hasMatch(value)) {
|
||||
return 'Por favor ingrese un email válido';
|
||||
}
|
||||
return null;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
decoration: const InputDecoration(
|
||||
prefixIcon: Icon(Icons.email_outlined),
|
||||
hintText: 'Email'),
|
||||
),
|
||||
const SizedBox(height: 20.0),
|
||||
_email != null
|
||||
? const SizedBox.shrink()
|
||||
: TextFormField(
|
||||
controller: _passwordController,
|
||||
obscureText: _obscureText,
|
||||
validator: (value) {
|
||||
if (enableLoginWithEmail) {
|
||||
if (value == null ||
|
||||
value.isEmpty) {
|
||||
return 'Por favor ingrese una contraseña.';
|
||||
}
|
||||
if (value.length < 5) {
|
||||
return 'Debe tener al menos 5 caracteres.';
|
||||
}
|
||||
return null;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
decoration: InputDecoration(
|
||||
prefixIcon: const Icon(
|
||||
Icons.lock_outline),
|
||||
suffixIcon: IconButton(
|
||||
icon: Icon(
|
||||
_obscureText
|
||||
? Icons.visibility
|
||||
: Icons.visibility_off,
|
||||
color: Colors.grey,
|
||||
),
|
||||
onPressed: () {
|
||||
setState(() {
|
||||
_obscureText =
|
||||
!_obscureText;
|
||||
});
|
||||
},
|
||||
),
|
||||
hintText: 'Contraseña'),
|
||||
),
|
||||
_email != null
|
||||
? const SizedBox.shrink()
|
||||
: const SizedBox(height: 20),
|
||||
],
|
||||
),
|
||||
)
|
||||
: const SizedBox(),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -752,6 +814,8 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
if (_formKey.currentState!.validate()) {
|
||||
await updateInfo();
|
||||
}
|
||||
|
||||
await userProvider.updateUserDataAndScores();
|
||||
},
|
||||
text: 'Guardar',
|
||||
),
|
||||
|
||||
@@ -8,7 +8,7 @@ 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/presentation/screens/service.dart';
|
||||
import 'package:prosappco/src/presentation/screens/map/service.dart';
|
||||
|
||||
class ServiceAfterScreen extends StatefulWidget {
|
||||
var eventoId;
|
||||
|
||||
+7
-27
@@ -30,14 +30,14 @@ import 'package:prosappco/src/presentation/widgets/shared/primary_button.dart';
|
||||
import 'package:prosappco/src/presentation/widgets/shared/warning_snackbar.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
class ServiceScreen extends StatefulWidget {
|
||||
const ServiceScreen({super.key});
|
||||
class ServiceOldScreen extends StatefulWidget {
|
||||
const ServiceOldScreen({super.key});
|
||||
|
||||
@override
|
||||
State<ServiceScreen> createState() => _ServiceScreenState();
|
||||
State<ServiceOldScreen> createState() => _ServiceOldScreenState();
|
||||
}
|
||||
|
||||
class _ServiceScreenState extends State<ServiceScreen> {
|
||||
class _ServiceOldScreenState extends State<ServiceOldScreen> {
|
||||
late String appVersion;
|
||||
final Uri _url = Uri.parse(
|
||||
'https://play.google.com/store/apps/details?id=com.prosapp.prosapp');
|
||||
@@ -57,27 +57,6 @@ class _ServiceScreenState extends State<ServiceScreen> {
|
||||
}
|
||||
}
|
||||
|
||||
// Future<List<LatLng>> getRouteCoordinates(
|
||||
// double startLat, double startLng, double endLat, double endLng) async {
|
||||
// List<LatLng> polylineCoordinates = [];
|
||||
|
||||
// PolylinePoints polylinePoints = PolylinePoints();
|
||||
|
||||
// PolylineResult result = await polylinePoints.getRouteBetweenCoordinates(
|
||||
// 'AIzaSyCW_og6qQ8W8G-5_BxIS4sBnl8cLkjL95s',
|
||||
// PointLatLng(startLat, startLng),
|
||||
// PointLatLng(endLat, endLng),
|
||||
// );
|
||||
|
||||
// if (result.points.isNotEmpty) {
|
||||
// result.points.forEach((PointLatLng point) {
|
||||
// polylineCoordinates.add(LatLng(point.latitude, point.longitude));
|
||||
// });
|
||||
// }
|
||||
|
||||
// return polylineCoordinates;
|
||||
// }
|
||||
|
||||
Future<void> sendPushNotification(String pro) async {
|
||||
try {
|
||||
http.Response response = await http.post(
|
||||
@@ -1217,9 +1196,10 @@ class _ServiceScreenState extends State<ServiceScreen> {
|
||||
const SizedBox(height: 15),
|
||||
TextFormField(
|
||||
controller: _observacionController,
|
||||
decoration: const InputDecoration(
|
||||
decoration: InputDecoration(
|
||||
prefixIcon: Icon(Icons.message_outlined),
|
||||
hintText: 'Observaciones'),
|
||||
hintText:
|
||||
'Observaciones ${user?.name} - ${user?.phoneNumber}'),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
PrimaryButton(
|
||||
@@ -6,6 +6,7 @@ import 'package:prosappco/src/authentication/authentication_repository.dart';
|
||||
import 'package:prosappco/src/components/photo_view.dart';
|
||||
import 'package:prosappco/src/models/scores_model.dart';
|
||||
import 'package:prosappco/src/models/user_model.dart';
|
||||
import 'package:prosappco/src/presentation/widgets/shared/warning_snackbar.dart';
|
||||
import 'package:prosappco/src/providers/user_provider.dart';
|
||||
import 'package:prosappco/src/presentation/screens/configuracion.dart';
|
||||
import 'package:prosappco/src/presentation/screens/messages_user.dart';
|
||||
@@ -322,10 +323,10 @@ class DrawerMenu extends StatelessWidget {
|
||||
user?.city == '' ||
|
||||
user?.phoneNumber == '' ||
|
||||
user?.phoneNumber == null) {
|
||||
Get.snackbar(
|
||||
'Completa tu perfil',
|
||||
'Para ser un profesional registrado, asegúrate de llenar todos los campos necesarios y no olvides guardar tus cambios para que surtan efecto.',
|
||||
snackPosition: SnackPosition.BOTTOM,
|
||||
WarningSnackbar.show(
|
||||
title: 'Completa tu perfil',
|
||||
message:
|
||||
'Para ser un profesional registrado, asegúrate de llenar todos los campos necesarios y no olvides guardar tus cambios para que surtan efecto.',
|
||||
);
|
||||
} else {
|
||||
if (user?.phoneNumber != user?.phoneNumber) {
|
||||
|
||||
Reference in New Issue
Block a user