update
This commit is contained in:
@@ -1,12 +1,17 @@
|
||||
import 'package:cloud_firestore/cloud_firestore.dart';
|
||||
import 'package:firebase_auth/firebase_auth.dart';
|
||||
import 'package:firebase_storage/firebase_storage.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_animate/flutter_animate.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'dart:io';
|
||||
import 'package:prosappco/src/authentication/authentication_repository.dart';
|
||||
import 'package:prosappco/src/components/drawer_menu.dart';
|
||||
import 'package:prosappco/src/controllers/add_name_email_city.dart';
|
||||
import 'package:prosappco/src/screens/city.dart';
|
||||
import 'package:prosappco/src/screens/new_number.dart';
|
||||
import 'package:prosappco/src/screens/new_password.dart';
|
||||
import 'package:prosappco/src/services/select_image_profile.dart';
|
||||
|
||||
import '../components/photo_view.dart';
|
||||
@@ -176,14 +181,14 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
_showChoiceDialog(context);
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.symmetric(vertical: 50),
|
||||
margin: const EdgeInsets.symmetric(vertical: 50),
|
||||
width: 100,
|
||||
height: 100,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF2BA4EC),
|
||||
color: const Color(0xFF2BA4EC),
|
||||
borderRadius: BorderRadius.circular(50),
|
||||
),
|
||||
child: Icon(
|
||||
child: const Icon(
|
||||
Icons.person,
|
||||
color: Colors.white,
|
||||
size: 90,
|
||||
@@ -199,14 +204,14 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
_showChoiceDialog(context);
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.symmetric(vertical: 50),
|
||||
margin: const EdgeInsets.symmetric(vertical: 50),
|
||||
width: 100,
|
||||
height: 100,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF2BA4EC),
|
||||
color: const Color(0xFF2BA4EC),
|
||||
borderRadius: BorderRadius.circular(50),
|
||||
),
|
||||
child: Icon(
|
||||
child: const Icon(
|
||||
Icons.person,
|
||||
color: Colors.white,
|
||||
size: 90,
|
||||
@@ -406,8 +411,11 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
_email != null
|
||||
? TextFormField(
|
||||
onTap: () {
|
||||
Navigator.pushNamed(
|
||||
context, '/nuevaPassword');
|
||||
Navigator.push(context, CupertinoPageRoute(
|
||||
builder: (BuildContext context) {
|
||||
return NewPasswordScreen();
|
||||
},
|
||||
));
|
||||
},
|
||||
readOnly: true,
|
||||
controller: _emailController,
|
||||
@@ -451,32 +459,43 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
TextFormField(
|
||||
readOnly: true,
|
||||
onTap: () async {
|
||||
final String? ciudad =
|
||||
(await Navigator.pushNamed(context, '/city'))
|
||||
as String?;
|
||||
final String? ciudad = await Navigator.push(
|
||||
context,
|
||||
CupertinoPageRoute(
|
||||
builder: (BuildContext context) {
|
||||
return const CityScreen();
|
||||
},
|
||||
),
|
||||
) as String?;
|
||||
|
||||
if (ciudad != null) {
|
||||
setState(() {
|
||||
_ciudad = ciudad as String;
|
||||
_ciudad = ciudad;
|
||||
});
|
||||
}
|
||||
},
|
||||
decoration: InputDecoration(
|
||||
prefixIcon: Icon(Icons.near_me),
|
||||
suffixIcon: Icon(Icons.arrow_drop_down),
|
||||
prefixIcon: const Icon(Icons.near_me),
|
||||
suffixIcon: const Icon(Icons.arrow_drop_down),
|
||||
hintStyle: city == ''
|
||||
? TextStyle()
|
||||
: TextStyle(color: Colors.black87),
|
||||
hintText: city == '' ? 'Ciudad' : '$city'),
|
||||
? const TextStyle()
|
||||
: const TextStyle(color: Colors.black87),
|
||||
hintText: city == '' ? 'Ciudad' : city),
|
||||
),
|
||||
const SizedBox(height: 20.0),
|
||||
TextFormField(
|
||||
controller: _phoneNumberController,
|
||||
readOnly: true,
|
||||
onTap: () {
|
||||
Navigator.pushNamed(context, '/newNumber');
|
||||
Navigator.of(context).push(
|
||||
CupertinoPageRoute(
|
||||
builder: (BuildContext context) {
|
||||
return const NewNumberScreen();
|
||||
},
|
||||
),
|
||||
);
|
||||
},
|
||||
decoration: InputDecoration(
|
||||
decoration: const InputDecoration(
|
||||
prefixIcon: Icon(Icons.phone_android),
|
||||
suffixIcon: Icon(Icons.edit_outlined),
|
||||
hintText: '+57'),
|
||||
@@ -486,12 +505,21 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
),
|
||||
Container(
|
||||
alignment: Alignment.bottomCenter,
|
||||
margin: EdgeInsets.only(top: 100),
|
||||
margin: const EdgeInsets.only(top: 100),
|
||||
padding: const EdgeInsets.only(bottom: 30),
|
||||
child: ElevatedButton(
|
||||
onPressed: () async {
|
||||
await updateInfo();
|
||||
},
|
||||
child: Text(
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: const Color(0xFF2BA4EC),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(50),
|
||||
),
|
||||
elevation: 0,
|
||||
minimumSize: const Size(200, 50),
|
||||
),
|
||||
child: const Text(
|
||||
'Guardar',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
@@ -499,16 +527,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
fontSize: 17,
|
||||
),
|
||||
),
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: Color(0xFF2BA4EC),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(50),
|
||||
),
|
||||
elevation: 0,
|
||||
minimumSize: Size(200, 50),
|
||||
),
|
||||
),
|
||||
padding: EdgeInsets.only(bottom: 30),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user