update
This commit is contained in:
@@ -33,9 +33,7 @@ class ServiceScreen extends StatefulWidget {
|
|||||||
State<ServiceScreen> createState() => _ServiceScreenState();
|
State<ServiceScreen> createState() => _ServiceScreenState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class _ServiceScreenState extends State<ServiceScreen> {
|
class _ServiceScreenState extends State<ServiceScreen> {
|
||||||
|
|
||||||
void _saveToken() async {
|
void _saveToken() async {
|
||||||
FirebaseMessaging messaging = FirebaseMessaging.instance;
|
FirebaseMessaging messaging = FirebaseMessaging.instance;
|
||||||
|
|
||||||
@@ -51,8 +49,6 @@ class _ServiceScreenState extends State<ServiceScreen> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Future<void> sendPushNotification(String pro) async {
|
Future<void> sendPushNotification(String pro) async {
|
||||||
try {
|
try {
|
||||||
http.Response response = await http.post(
|
http.Response response = await http.post(
|
||||||
@@ -73,7 +69,7 @@ class _ServiceScreenState extends State<ServiceScreen> {
|
|||||||
'click_action': 'FLUTTER_NOTIFICATION_CLICK',
|
'click_action': 'FLUTTER_NOTIFICATION_CLICK',
|
||||||
'id': '1',
|
'id': '1',
|
||||||
'status': 'done',
|
'status': 'done',
|
||||||
'screen':'solicitud'
|
'screen': 'solicitud'
|
||||||
},
|
},
|
||||||
'to': pro
|
'to': pro
|
||||||
},
|
},
|
||||||
@@ -206,7 +202,6 @@ class _ServiceScreenState extends State<ServiceScreen> {
|
|||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
|
|
||||||
|
|
||||||
if (_ciudad == '...') {
|
if (_ciudad == '...') {
|
||||||
AuthenticationRepository.instance
|
AuthenticationRepository.instance
|
||||||
@@ -716,61 +711,6 @@ class _ServiceScreenState extends State<ServiceScreen> {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
|
||||||
padding:
|
|
||||||
const EdgeInsets.only(top: 22, left: 100, right: 25),
|
|
||||||
child: Container(
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.circular(50),
|
|
||||||
color: Colors.white,
|
|
||||||
boxShadow: [
|
|
||||||
BoxShadow(
|
|
||||||
color: Colors.grey.withOpacity(0.4),
|
|
||||||
spreadRadius: 1,
|
|
||||||
blurRadius: 2,
|
|
||||||
offset: const Offset(1, 2),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 20),
|
|
||||||
child: TextFormField(
|
|
||||||
onTap: () async {
|
|
||||||
final String? serviceType = await Navigator.push(
|
|
||||||
context,
|
|
||||||
CupertinoPageRoute(
|
|
||||||
builder: (BuildContext context) {
|
|
||||||
return const ServiceTypeScreen();
|
|
||||||
},
|
|
||||||
),
|
|
||||||
) as String?;
|
|
||||||
|
|
||||||
if (serviceType != null) {
|
|
||||||
setState(() {
|
|
||||||
_serviceType = serviceType;
|
|
||||||
_serviceTypeController.text = _serviceType;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
controller: _serviceTypeController,
|
|
||||||
style: const TextStyle(
|
|
||||||
color: Colors.black87,
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
),
|
|
||||||
readOnly: true,
|
|
||||||
decoration: InputDecoration(
|
|
||||||
hintText:
|
|
||||||
_serviceType == '' ? 'Servicio' : _serviceType,
|
|
||||||
hintStyle: const TextStyle(
|
|
||||||
color: Colors.black87,
|
|
||||||
fontWeight: FontWeight.w600),
|
|
||||||
border: InputBorder.none,
|
|
||||||
enabledBorder: InputBorder.none,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
@@ -784,6 +724,41 @@ class _ServiceScreenState extends State<ServiceScreen> {
|
|||||||
child: Form(
|
child: Form(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
|
TextFormField(
|
||||||
|
onTap: () async {
|
||||||
|
final String? serviceType =
|
||||||
|
await Navigator.push(
|
||||||
|
context,
|
||||||
|
CupertinoPageRoute(
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return const ServiceTypeScreen();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
) as String?;
|
||||||
|
|
||||||
|
if (serviceType != null) {
|
||||||
|
setState(() {
|
||||||
|
_serviceType = serviceType;
|
||||||
|
_serviceTypeController.text = _serviceType;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
controller: _serviceTypeController,
|
||||||
|
style: const TextStyle(
|
||||||
|
color: Colors.black87,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
),
|
||||||
|
readOnly: true,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
hintText: _serviceType == ''
|
||||||
|
? 'Servicio'
|
||||||
|
: _serviceType,
|
||||||
|
border: InputBorder.none,
|
||||||
|
enabledBorder: InputBorder.none,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
const SizedBox(height: 15),
|
||||||
Column(
|
Column(
|
||||||
children: [
|
children: [
|
||||||
TextFormField(
|
TextFormField(
|
||||||
@@ -811,11 +786,10 @@ class _ServiceScreenState extends State<ServiceScreen> {
|
|||||||
profesional.name.toString();
|
profesional.name.toString();
|
||||||
|
|
||||||
professionalId = profesional.id;
|
professionalId = profesional.id;
|
||||||
print(profesional);
|
|
||||||
if (profesional.token != '') {
|
if (profesional.token != '') {
|
||||||
professionalToken =
|
professionalToken =
|
||||||
profesional.token!;
|
profesional.token!;
|
||||||
print(professionalToken);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
professionalTarifa =
|
professionalTarifa =
|
||||||
@@ -877,7 +851,7 @@ class _ServiceScreenState extends State<ServiceScreen> {
|
|||||||
placeAutoComplete(modifiedValue);
|
placeAutoComplete(modifiedValue);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
Container(
|
SizedBox(
|
||||||
height: _placesList.isNotEmpty
|
height: _placesList.isNotEmpty
|
||||||
? 200
|
? 200
|
||||||
: 0, // Ajusta la altura según tus necesidades
|
: 0, // Ajusta la altura según tus necesidades
|
||||||
@@ -900,7 +874,7 @@ class _ServiceScreenState extends State<ServiceScreen> {
|
|||||||
|
|
||||||
final newCoordinates = LatLng(
|
final newCoordinates = LatLng(
|
||||||
selectedLatitude, selectedLongitude);
|
selectedLatitude, selectedLongitude);
|
||||||
googleMapController?.animateCamera(
|
googleMapController.animateCamera(
|
||||||
CameraUpdate.newLatLng(newCoordinates),
|
CameraUpdate.newLatLng(newCoordinates),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -19,9 +19,7 @@ class SsupportStateScreen extends State<SupportScreen> {
|
|||||||
final String body = '';
|
final String body = '';
|
||||||
|
|
||||||
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://wa.me/$number?text=${Uri.parse('Hola! soy usuario de Prosapp y quisiera conocer mas sobre esta app')}';
|
|
||||||
|
|
||||||
if (!await launch(_whatsappUrl)) {
|
if (!await launch(_whatsappUrl)) {
|
||||||
throw Exception('Could not launch $_whatsappUrl');
|
throw Exception('Could not launch $_whatsappUrl');
|
||||||
}
|
}
|
||||||
@@ -39,14 +37,10 @@ class SsupportStateScreen extends State<SupportScreen> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void _sendEmailWeb(String recipients) async {
|
void _sendEmailWeb(String recipients) async {
|
||||||
final email =
|
final email = 'mailto:$recipients?subject=${Uri.encodeComponent(recipients)}&body=${Uri.encodeComponent(body)}';
|
||||||
'mailto:$recipients?subject=${Uri.encodeComponent(recipients)}&body=${Uri.encodeComponent(body)}';
|
|
||||||
if (await canLaunch(email)) {
|
if (await canLaunch(email)) {
|
||||||
await launch(email);
|
await launch(email);
|
||||||
} else {
|
} else {}
|
||||||
// No se pudo abrir el cliente de correo electrónico
|
|
||||||
// Puedes mostrar un diálogo o realizar otra acción en este caso
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
Reference in New Issue
Block a user