diff --git a/images/checklist-rafiki.svg b/images/checklist-rafiki.svg new file mode 100644 index 0000000..eed6b62 --- /dev/null +++ b/images/checklist-rafiki.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images/checklist.gif b/images/checklist.gif new file mode 100644 index 0000000..044fa21 Binary files /dev/null and b/images/checklist.gif differ diff --git a/lib/main.dart b/lib/main.dart index 5cb4e60..151c5dc 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -6,6 +6,8 @@ import 'package:prosappco/src/screens/login.dart'; import 'package:firebase_core/firebase_core.dart'; import 'package:prosappco/src/screens/login_email.dart'; import 'package:prosappco/src/screens/new_number.dart'; +import 'package:prosappco/src/screens/professional_profile.dart'; +import 'package:prosappco/src/screens/professional_revision.dart'; import 'package:prosappco/src/screens/profile.dart'; import 'package:prosappco/src/screens/register.dart'; import 'package:prosappco/src/screens/welcome.dart'; @@ -37,6 +39,8 @@ class MyApp extends StatelessWidget { '/register': (context) => RegisterScreen(), '/city': (context) => CityScreen(), '/newNumber': (context) => NewNumberScreen(), + '/profesionalRevision': (context) => ProfessionalRevisionScreen(), + '/profesionalProfile': (context) => ProfessionalProfileScreen() }, onGenerateRoute: (settings) { throw Exception('Ruta desconocida: ${settings.name}'); diff --git a/lib/src/screens/professional_profile.dart b/lib/src/screens/professional_profile.dart new file mode 100644 index 0000000..52b0e2d --- /dev/null +++ b/lib/src/screens/professional_profile.dart @@ -0,0 +1,37 @@ +import 'package:flutter/material.dart'; + +class ProfessionalProfileScreen extends StatefulWidget { + const ProfessionalProfileScreen({super.key}); + + @override + State createState() => + ProfessionalProfileScreenState(); +} + +class ProfessionalProfileScreenState extends State { + @override + Widget build(BuildContext context) { + return SafeArea( + child: Scaffold( + appBar: AppBar( + backgroundColor: Colors.white, + leading: IconButton( + icon: Icon(Icons.arrow_back), + onPressed: () { + Navigator.pushReplacementNamed(context, '/profile'); + }, + ), + iconTheme: IconThemeData( + color: Colors.black, + ), + title: Text( + 'Perfil profesional', + style: TextStyle( + color: Colors.black, + ), + )), + body: Container( + child: Text('data'), + ))); + } +} diff --git a/lib/src/screens/professional_revision.dart b/lib/src/screens/professional_revision.dart new file mode 100644 index 0000000..74838f4 --- /dev/null +++ b/lib/src/screens/professional_revision.dart @@ -0,0 +1,112 @@ +import 'package:flutter/material.dart'; + +class ProfessionalRevisionScreen extends StatefulWidget { + const ProfessionalRevisionScreen({super.key}); + + @override + State createState() => + _ProfessionalRevisionScreenState(); +} + +class _ProfessionalRevisionScreenState + extends State { + @override + Widget build(BuildContext context) { + return SafeArea( + child: Scaffold( + appBar: AppBar( + backgroundColor: Colors.white, + leading: IconButton( + icon: Icon(Icons.arrow_back), + onPressed: () { + Navigator.pushReplacementNamed(context, '/profile'); + }, + ), + iconTheme: IconThemeData( + color: Colors.black, + ), + title: Text( + 'Perfil profesional', + style: TextStyle( + color: Colors.black, + ), + )), + body: Container( + child: Padding( + padding: const EdgeInsets.only(top: 40), + child: Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Icon( + Icons.access_time, + color: Color(0xFF2BA4EC), + ), + SizedBox(width: 8), + Text('Información en revisión.', + style: TextStyle( + color: Color(0xFF2BA4EC), + fontSize: 17, + fontWeight: FontWeight.w500)), + ], + ), + const Image( + image: AssetImage('images/checklist.gif'), + width: 300, + ), + Container( + margin: EdgeInsets.symmetric(horizontal: 40), + decoration: BoxDecoration( + color: Color(0xFFD6F4FF), + borderRadius: BorderRadius.circular(30), + boxShadow: [ + BoxShadow( + color: Colors.grey.withOpacity(0.5), + spreadRadius: 2, + blurRadius: 5, + offset: Offset(0, 3), // changes position of shadow + ), + ], + ), + padding: EdgeInsets.symmetric(vertical: 15, horizontal: 25), + child: Wrap( + alignment: WrapAlignment.start, // Centra el contenido + children: [ + Row( + children: [ + Icon( + Icons.info_outline, + size: 20, + ), + SizedBox(width: 5), + Text( + 'Su información, esta en revisión, ', + style: TextStyle( + fontSize: 14, + ), + ), + ], + ), + Text( + 'una vez aprobada podrá acceder, ', + style: TextStyle( + fontSize: 14, + ), + ), + Text( + 'al perfil profesional.', + style: TextStyle( + fontSize: 14, + ), + ), + ], + ), + ), + ], + ), + ), + ), + )); + } +} diff --git a/lib/src/screens/profile.dart b/lib/src/screens/profile.dart index 38a778f..92848b6 100644 --- a/lib/src/screens/profile.dart +++ b/lib/src/screens/profile.dart @@ -7,7 +7,6 @@ import 'dart:io'; import 'package:prosappco/src/authentication/authentication_repository.dart'; import 'package:prosappco/src/controllers/add_name_email_city.dart'; import 'package:prosappco/src/services/select_image_profile.dart'; -import 'package:prosappco/src/services/upload_image.dart'; import '../components/photo_view.dart'; @@ -273,15 +272,6 @@ class _ProfileScreenState extends State { } } - Widget prueba() { - try { - return ReferencePhoto(ref: null); - } catch (e) { - print('errrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrror $e'); - return Center(); - } - } - Future _showChoiceDialog(BuildContext context) async { return showDialog( context: context, @@ -336,10 +326,10 @@ class _ProfileScreenState extends State { resizeToAvoidBottomInset: false, appBar: AppBar( backgroundColor: Colors.white, - iconTheme: IconThemeData( + iconTheme: const IconThemeData( color: Colors.black, ), - title: Text( + title: const Text( 'Perfil', style: TextStyle( color: Colors.black, @@ -359,18 +349,19 @@ class _ProfileScreenState extends State { onTap: () { Scaffold.of(context).openEndDrawer(); }, - title: Text('${user?.displayName}', - style: TextStyle(fontWeight: FontWeight.bold)), + title: Text(user?.displayName ?? '', + style: + const TextStyle(fontWeight: FontWeight.bold)), subtitle: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - '${user?.phoneNumber}', - style: TextStyle(fontSize: 12), + user?.phoneNumber ?? '', + style: const TextStyle(fontSize: 12), ), Text( - '$city', - style: TextStyle(fontSize: 12), + city, + style: const TextStyle(fontSize: 12), ), ], ), @@ -516,7 +507,9 @@ class _ProfileScreenState extends State { ), SizedBox(width: 5), ElevatedButton( - onPressed: () {}, + onPressed: () { + Navigator.pushNamed(context, '/profesionalRevision'); + }, child: Text( 'Modo profesional', style: TextStyle( diff --git a/lib/src/screens/welcome.dart b/lib/src/screens/welcome.dart index 914ff9d..b837d74 100644 --- a/lib/src/screens/welcome.dart +++ b/lib/src/screens/welcome.dart @@ -67,17 +67,17 @@ class _WelcomeScreenState extends State { onTap: () { Navigator.pushNamed(context, '/profile'); }, - title: Text('${user?.displayName ?? user?.email}', + title: Text(user?.displayName ?? '', style: TextStyle(fontWeight: FontWeight.bold)), subtitle: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - '${user?.phoneNumber ?? ''}', + user?.phoneNumber ?? '', style: TextStyle(fontSize: 12), ), Text( - '${city ?? ""}', + city, style: TextStyle(fontSize: 12), ), ], @@ -222,7 +222,9 @@ class _WelcomeScreenState extends State { ), SizedBox(width: 5), ElevatedButton( - onPressed: () {}, + onPressed: () { + Navigator.pushNamed(context, '/profesionalProfile'); + }, child: Text( 'Modo profesional', style: TextStyle( diff --git a/lib/src/services/upload_image.dart b/lib/src/services/upload_image.dart deleted file mode 100644 index 3d5471f..0000000 --- a/lib/src/services/upload_image.dart +++ /dev/null @@ -1,24 +0,0 @@ -import 'dart:io'; - -import 'package:firebase_core/firebase_core.dart'; -import 'package:firebase_storage/firebase_storage.dart'; - -// final FirebaseStorage storage = FirebaseStorage.instance; - -// Future uploadImage(File image) async { -// final String namefile = image.path.split('/').last; - -// Reference ref = storage.ref().child('profile').child(namefile); - -// final UploadTask uploadTask = ref.putFile(image); - -// final TaskSnapshot snapshot = await uploadTask.whenComplete(() => true); - -// final String url = await snapshot.ref.getDownloadURL(); - -// if (snapshot.state == TaskState.success) { -// return true; -// } else { -// return false; -// } -// }