diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000000000000000000000000000000000000..893af749c0a17bf711ae36dd9bf41b4fe9a579ee --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,28 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "aplicacionrutasturisticas", + "cwd": "fronted\\aplicacionrutasturisticas", + "request": "launch", + "type": "dart" + }, + { + "name": "aplicacionrutasturisticas (profile mode)", + "cwd": "fronted\\aplicacionrutasturisticas", + "request": "launch", + "type": "dart", + "flutterMode": "profile" + }, + { + "name": "aplicacionrutasturisticas (release mode)", + "cwd": "fronted\\aplicacionrutasturisticas", + "request": "launch", + "type": "dart", + "flutterMode": "release" + } + ] +} \ No newline at end of file diff --git a/fronted/aplicacionrutasturisticas/lib/pages/login.dart b/fronted/aplicacionrutasturisticas/lib/pages/login.dart index f6e8791641963066008082be8566aeb3a647edc4..e5864ba9d5d87415a2be457bb8ae7f5fa7d02ba8 100644 --- a/fronted/aplicacionrutasturisticas/lib/pages/login.dart +++ b/fronted/aplicacionrutasturisticas/lib/pages/login.dart @@ -1,33 +1,30 @@ import 'package:flutter/material.dart'; -class LoginPage extends StatelessWidget{ +class LoginPage extends StatelessWidget { static String id = "login_page"; @override - Widget build(BuildContext context){ + Widget build(BuildContext context) { return SafeArea( child: Scaffold( - backgroundColor: Color.fromARGB(0, 255, 255, 255) , + backgroundColor: Color.fromARGB(0, 255, 255, 255), body: Center( - child:Column( + child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ Text( "Login".toUpperCase(), textAlign: TextAlign.center, style: TextStyle( - color: Colors.white, - fontSize: 40, - fontWeight: FontWeight.bold, - fontFamily: 'impact' - ), + color: Colors.white, + fontSize: 40, + fontWeight: FontWeight.bold, + fontFamily: 'impact'), ), SizedBox( height: 20.0, ), Row( - children: [ - - ], + children: [], ) ], ), @@ -35,4 +32,4 @@ class LoginPage extends StatelessWidget{ ), ); } -} \ No newline at end of file +} diff --git a/fronted/aplicacionrutasturisticas/lib/pages/register.dart b/fronted/aplicacionrutasturisticas/lib/pages/register.dart new file mode 100644 index 0000000000000000000000000000000000000000..01d23f96db3f8b28bba04ccec3484f507f726ed4 --- /dev/null +++ b/fronted/aplicacionrutasturisticas/lib/pages/register.dart @@ -0,0 +1,88 @@ +import 'dart:ui'; + +import 'package:aplicacionrutasturisticas/utilerias/Buttons.dart'; +import 'package:aplicacionrutasturisticas/utilerias/Textfields.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/widgets.dart'; +import 'package:flutter/services.dart'; + +class TextFielEjemplo extends StatefulWidget { + const TextFielEjemplo({super.key}); + + @override + _TextFielEjemploState createState() => _TextFielEjemploState(); +} + +class _TextFielEjemploState extends State { + @override + Widget build(BuildContext context) { + return MaterialApp( + home: Scaffold( + appBar: AppBar( + title: SizedBox( + child: Center( + child: Text("Registro", + style: const TextStyle(fontWeight: FontWeight.bold), + selectionColor: Colors.black, + textScaleFactor: lerpDouble(2, 2, 3)))), + ), + //backgroundColor: Colors.black, + body: const Center( + child: SingleChildScrollView( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + iconButton(), + SizedBox( + height: 20.0, + ), + hacerTextField(texto: "Nombre/s", ocultar: false), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + hacerTextField( + texto: "Apellidos", + ocultar: false, + ), + ], + ), + SizedBox(height: 20), + ColoredBox( + color: Colors.white, + child: hacerTextField( + texto: "Email", + ocultar: false, + ), + ), + SizedBox( + height: 20, + ), + ColoredBox( + color: Colors.white, + child: hacerTextField( + texto: "Numero de teléfono", ocultar: false)), + SizedBox(height: 20), + ColoredBox( + color: Colors.white, + child: hacerTextField(texto: "Contraseña", ocultar: true)), + SizedBox(height: 20), + ColoredBox( + color: Colors.white, + child: hacerTextField( + texto: "Confirma contraseña", ocultar: true), + ), + SizedBox(height: 20), + ColoredBox( + color: Colors.white, + child: boton_Escribir( + texto: "Registro", + )) + ], + ), + ), + ), + ), + ); + } +} diff --git a/fronted/aplicacionrutasturisticas/lib/utilerias/Buttons.dart b/fronted/aplicacionrutasturisticas/lib/utilerias/Buttons.dart new file mode 100644 index 0000000000000000000000000000000000000000..3743a2955d74926ebca630d3e63e5b305d9db458 --- /dev/null +++ b/fronted/aplicacionrutasturisticas/lib/utilerias/Buttons.dart @@ -0,0 +1,32 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/widgets.dart'; + +class boton_Escribir extends StatefulWidget { + final String texto; + + const boton_Escribir({Key? key, required this.texto}) : super(key: key); + + @override + _BotonEscribirState createState() => _BotonEscribirState(); +} + +class _BotonEscribirState extends State { + Color backgroundColor = Colors.red; + + @override + Widget build(BuildContext context) { + return OutlinedButton( + onPressed: () { + debugPrint("Acabas de hacer click"); + //objectoX; + }, + child: Text(widget.texto), + style: ButtonStyle( + //fixedSize: MaterialStateProperty.all(Size(200, 10)), + foregroundColor: MaterialStateProperty.all(Colors.white), + backgroundColor: MaterialStateProperty.all(backgroundColor), + ), + ); + } +} diff --git a/fronted/aplicacionrutasturisticas/lib/utilerias/Textfields.dart b/fronted/aplicacionrutasturisticas/lib/utilerias/Textfields.dart new file mode 100644 index 0000000000000000000000000000000000000000..f580b5ed55b42bb84ad973e18b600159f6f437f7 --- /dev/null +++ b/fronted/aplicacionrutasturisticas/lib/utilerias/Textfields.dart @@ -0,0 +1,46 @@ +import 'dart:ui'; + +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/widgets.dart'; + +class hacerTextField extends StatelessWidget { + final String texto; + final bool ocultar; + const hacerTextField({Key? key, required this.texto, required this.ocultar}) + : super(key: key); + @override + Widget build(BuildContext context) { + return SizedBox( + width: 250, + child: TextField( + cursorColor: Colors.purple, + style: const TextStyle( + color: Color.fromARGB(255, 0, 0, 0), + ), + obscureText: ocultar, + decoration: InputDecoration( + border: const OutlineInputBorder(), + labelText: texto, + ), + ), + ); + } +} + +class iconButton extends StatelessWidget { + const iconButton({super.key}); + + @override + Widget build(BuildContext context) { + return GestureDetector( + child: Image.network( + "https://i.ibb.co/9Vpn7vW/imagen-2024-04-23-010203690.png", + scale: 5, + ), + onTap: () { + debugPrint("Has hecho click en el icono"); + }, + ); + } +}