From cca8c87e7cf5e9c14380ef0bd651f0bec11945f2 Mon Sep 17 00:00:00 2001 From: Juan Felipe Duarte <70235683+DuarteJFelipe@users.noreply.github.com> Date: Tue, 6 Jun 2023 11:16:05 -0500 Subject: [PATCH] servicios web --- lib/src/screens/service.dart | 105 ++++++++++++++++++++++++++++++++++- 1 file changed, 104 insertions(+), 1 deletion(-) diff --git a/lib/src/screens/service.dart b/lib/src/screens/service.dart index 5e35c0a..b91bd94 100644 --- a/lib/src/screens/service.dart +++ b/lib/src/screens/service.dart @@ -18,6 +18,7 @@ import 'package:intl/intl.dart'; import 'package:prosappco/src/screens/profile.dart'; import 'package:prosappco/src/screens/service_after.dart'; import 'package:prosappco/src/screens/service_type.dart'; +import 'package:flutter/foundation.dart'; class ServiceScreen extends StatefulWidget { const ServiceScreen({super.key}); @@ -28,7 +29,6 @@ class ServiceScreen extends StatefulWidget { class _ServiceScreenState extends State { EventoService eventoService = EventoService(); - final TextEditingController _locationController = TextEditingController(); String _locationPosition = ''; String ubicacion = ''; @@ -203,6 +203,59 @@ class _ServiceScreenState extends State { @override Widget build(BuildContext context) { + if (kIsWeb) { + return Scaffold( + drawer: DrawerMenu(), + appBar: AppBar( + elevation: 0, + title: Row( + children: [ + Container( + padding: const EdgeInsets.only(right: 10), + decoration: const BoxDecoration( + border: Border( + right: BorderSide( + color: Colors.white, + width: 1.0, + ), + ), + ), + child: const Text( + 'Prosapp', + ), + ), + const SizedBox(width: 8), + TextButton( + style: TextButton.styleFrom( + foregroundColor: Colors.white, + ), + onPressed: () { + showDialog( + context: context, + builder: (context) { + return _EnterLocationDialog(); + }, + ); + }, + child: Row( + children: const [ + Icon(Icons.location_on), + SizedBox(width: 8), + Text('Ingresar mi ubicación'), + SizedBox(width: 4), + Icon(Icons.keyboard_arrow_down_rounded, size: 16), + ], + ), + ), + ], + ), // Texto del título + ), + body: Container( + child: const Text('data'), + ), + ); + } + return SafeArea( child: Scaffold( backgroundColor: const Color(0xFFD6F4FF), @@ -669,3 +722,53 @@ class _ServiceScreenState extends State { ); } } + +class _EnterLocationDialog extends StatelessWidget { + const _EnterLocationDialog({super.key}); + + @override + Widget build(BuildContext context) { + return AlertDialog( + content: Container( + height: 200, + child: Column( + children: [ + const Text( + 'Ingresa la ubicación', + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 18, + ), + ), + const SizedBox(height: 20), + TextFormField( + decoration: const InputDecoration( + hintText: 'Ubicación', + ), + ), + const SizedBox(height: 20), + ElevatedButton( + onPressed: () {}, + style: ElevatedButton.styleFrom( + backgroundColor: const Color(0xFF2BA4EC), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(50), + ), + elevation: 0, + minimumSize: const Size(230, 50), + ), + child: const Text( + 'Aceptar', + style: TextStyle( + color: Colors.white, + fontWeight: FontWeight.bold, + fontSize: 18, + ), + ), + ), + ], + ), + ), + ); + } +}