126 lines
4.2 KiB
Dart
126 lines
4.2 KiB
Dart
import 'package:cloud_firestore/cloud_firestore.dart';
|
|
import 'package:firebase_auth/firebase_auth.dart';
|
|
import 'package:firebase_storage/firebase_storage.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:get/get.dart';
|
|
import 'package:prosappco/src/authentication/authentication_repository.dart';
|
|
import 'package:prosappco/src/components/drawer_menu.dart';
|
|
import 'package:prosappco/src/components/primary_btn.dart';
|
|
import 'package:prosappco/src/controllers/add_name_email_city.dart';
|
|
import 'package:prosappco/src/models/score_model.dart';
|
|
import 'package:prosappco/src/models/user_model.dart';
|
|
|
|
import '../components/photo_view.dart';
|
|
|
|
class WelcomeScreen extends StatefulWidget {
|
|
const WelcomeScreen({super.key});
|
|
|
|
@override
|
|
State<WelcomeScreen> createState() => _WelcomeScreenState();
|
|
}
|
|
|
|
class _WelcomeScreenState extends State<WelcomeScreen> {
|
|
final FirebaseStorage storage = FirebaseStorage.instance;
|
|
final uid = AuthenticationRepository.instance.getCurrentUserUid();
|
|
final controller = Get.put(NameEmailCityController());
|
|
|
|
@override
|
|
void initState() {
|
|
super.initState();
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return SafeArea(
|
|
child: Scaffold(
|
|
drawer: DrawerMenu(),
|
|
resizeToAvoidBottomInset: false,
|
|
backgroundColor: const Color(0xFFD6F4FF),
|
|
body: Stack(
|
|
children: [
|
|
Container(
|
|
margin: const EdgeInsets.only(top: 130),
|
|
width: double.infinity,
|
|
height: 800,
|
|
decoration: const BoxDecoration(
|
|
color: Colors.white,
|
|
borderRadius: BorderRadius.only(
|
|
topRight: Radius.circular(50),
|
|
topLeft: Radius.circular(50))),
|
|
),
|
|
Container(
|
|
margin: const EdgeInsets.only(top: 20, left: 30),
|
|
child: Align(
|
|
alignment: Alignment.topCenter,
|
|
child: Row(
|
|
children: [
|
|
Builder(
|
|
builder: (context) => ElevatedButton(
|
|
style: ElevatedButton.styleFrom(
|
|
backgroundColor: Colors.white,
|
|
shape: const CircleBorder(),
|
|
elevation: 3,
|
|
minimumSize: const Size(50, 50),
|
|
),
|
|
child: const Icon(
|
|
Icons.menu,
|
|
color: Colors.black,
|
|
size: 30,
|
|
),
|
|
onPressed: () {
|
|
Scaffold.of(context).openDrawer();
|
|
},
|
|
),
|
|
),
|
|
const SizedBox(
|
|
width: 150,
|
|
),
|
|
const Padding(
|
|
padding: EdgeInsets.only(top: 50),
|
|
child: Image(
|
|
image: AssetImage('images/logo_prosapp.png'),
|
|
width: 120,
|
|
height: 50,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
Container(
|
|
padding: const EdgeInsets.symmetric(horizontal: 0, vertical: 20),
|
|
margin: const EdgeInsets.only(top: 170),
|
|
child: const Align(
|
|
alignment: Alignment.topCenter,
|
|
child: Text(
|
|
'Bienvenido',
|
|
style: TextStyle(
|
|
color: Color(0xFF262626),
|
|
fontSize: 38.0,
|
|
fontWeight: FontWeight.bold,
|
|
),
|
|
),
|
|
),
|
|
),
|
|
Container(
|
|
padding: const EdgeInsets.symmetric(horizontal: 0, vertical: 20),
|
|
margin: const EdgeInsets.only(top: 280, left: 50, right: 50),
|
|
child: Column(children: [
|
|
Padding(
|
|
padding: const EdgeInsets.only(bottom: 40),
|
|
child: Center(
|
|
child: PrimaryButtom(
|
|
onPressed: () {
|
|
Navigator.pushNamed(context, '/servicio');
|
|
},
|
|
label: 'Solicitar un servicio'),
|
|
),
|
|
),
|
|
]),
|
|
),
|
|
],
|
|
),
|
|
));
|
|
}
|
|
}
|