fix
This commit is contained in:
+98
-108
@@ -97,62 +97,12 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 20),
|
const SizedBox(height: 20),
|
||||||
PrimaryButtom(
|
ButtonBottom(
|
||||||
onPressed: () {
|
formKey: _formKey, completePhoneNumber: completePhoneNumber),
|
||||||
if (_formKey.currentState!.validate()) {
|
|
||||||
PhoneAuthController.instance.phoneAuthentication(
|
|
||||||
completePhoneNumber.trim(),
|
|
||||||
);
|
|
||||||
Get.to(
|
|
||||||
() => CodeValidationScreen(
|
|
||||||
phoneNumber: completePhoneNumber.trim(),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
label: 'Enviar código',
|
|
||||||
),
|
|
||||||
const SizedBox(height: 20),
|
const SizedBox(height: 20),
|
||||||
GestureDetector(
|
const GestureBottom(),
|
||||||
onTap: () {
|
|
||||||
Navigator.pushNamed(context, '/login');
|
|
||||||
},
|
|
||||||
child: const Text(
|
|
||||||
'Entrar con correo electronico',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 15.0, color: Color(0xFF65676B),
|
|
||||||
decoration: TextDecoration.underline, // Subrayado
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 20),
|
const SizedBox(height: 20),
|
||||||
RichText(
|
const RichTxTBottom(),
|
||||||
text: TextSpan(
|
|
||||||
style: const TextStyle(
|
|
||||||
fontSize: 16.0,
|
|
||||||
color: Color(0xFF65676B),
|
|
||||||
fontFamily: 'Poppins',
|
|
||||||
),
|
|
||||||
children: [
|
|
||||||
const TextSpan(text: 'No estas registrado? '),
|
|
||||||
WidgetSpan(
|
|
||||||
child: GestureDetector(
|
|
||||||
onTap: () {
|
|
||||||
Navigator.pushNamed(context, '/register');
|
|
||||||
},
|
|
||||||
child: const Text(
|
|
||||||
'Registrarse',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 16.0,
|
|
||||||
color: Color(0xFF2BA4EC),
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 20),
|
const SizedBox(height: 20),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
@@ -256,62 +206,13 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 20),
|
const SizedBox(height: 20),
|
||||||
PrimaryButtom(
|
ButtonBottom(
|
||||||
onPressed: () {
|
formKey: _formKey,
|
||||||
if (_formKey.currentState!.validate()) {
|
completePhoneNumber: completePhoneNumber),
|
||||||
PhoneAuthController.instance.phoneAuthentication(
|
|
||||||
completePhoneNumber.trim(),
|
|
||||||
);
|
|
||||||
Get.to(
|
|
||||||
() => CodeValidationScreen(
|
|
||||||
phoneNumber: completePhoneNumber.trim(),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
label: 'Enviar código',
|
|
||||||
),
|
|
||||||
const SizedBox(height: 20),
|
const SizedBox(height: 20),
|
||||||
GestureDetector(
|
const GestureBottom(),
|
||||||
onTap: () {
|
|
||||||
Navigator.pushNamed(context, '/login');
|
|
||||||
},
|
|
||||||
child: const Text(
|
|
||||||
'Entrar con correo electronico',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 15.0, color: Color(0xFF65676B),
|
|
||||||
decoration: TextDecoration.underline, // Subrayado
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 20),
|
const SizedBox(height: 20),
|
||||||
RichText(
|
const RichTxTBottom(),
|
||||||
text: TextSpan(
|
|
||||||
style: const TextStyle(
|
|
||||||
fontSize: 16.0,
|
|
||||||
color: Color(0xFF65676B),
|
|
||||||
fontFamily: 'Poppins',
|
|
||||||
),
|
|
||||||
children: [
|
|
||||||
const TextSpan(text: 'No estas registrado? '),
|
|
||||||
WidgetSpan(
|
|
||||||
child: GestureDetector(
|
|
||||||
onTap: () {
|
|
||||||
Navigator.pushNamed(context, '/register');
|
|
||||||
},
|
|
||||||
child: const Text(
|
|
||||||
'Registrarse',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 16.0,
|
|
||||||
color: Color(0xFF2BA4EC),
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -322,3 +223,92 @@ class _LoginScreenState extends State<LoginScreen> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class ButtonBottom extends StatelessWidget {
|
||||||
|
const ButtonBottom({
|
||||||
|
super.key,
|
||||||
|
required GlobalKey<FormState> formKey,
|
||||||
|
required this.completePhoneNumber,
|
||||||
|
}) : _formKey = formKey;
|
||||||
|
|
||||||
|
final GlobalKey<FormState> _formKey;
|
||||||
|
final String completePhoneNumber;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return PrimaryButtom(
|
||||||
|
onPressed: () {
|
||||||
|
if (_formKey.currentState!.validate()) {
|
||||||
|
PhoneAuthController.instance.phoneAuthentication(
|
||||||
|
completePhoneNumber.trim(),
|
||||||
|
);
|
||||||
|
Get.to(
|
||||||
|
() => CodeValidationScreen(
|
||||||
|
phoneNumber: completePhoneNumber.trim(),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
label: 'Enviar código',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class GestureBottom extends StatelessWidget {
|
||||||
|
const GestureBottom({
|
||||||
|
super.key,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
Navigator.pushNamed(context, '/login');
|
||||||
|
},
|
||||||
|
child: const Text(
|
||||||
|
'Entrar con correo electronico',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 15.0, color: Color(0xFF65676B),
|
||||||
|
decoration: TextDecoration.underline, // Subrayado
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class RichTxTBottom extends StatelessWidget {
|
||||||
|
const RichTxTBottom({
|
||||||
|
super.key,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return RichText(
|
||||||
|
text: TextSpan(
|
||||||
|
style: const TextStyle(
|
||||||
|
fontSize: 16.0,
|
||||||
|
color: Color(0xFF65676B),
|
||||||
|
fontFamily: 'Poppins',
|
||||||
|
),
|
||||||
|
children: [
|
||||||
|
const TextSpan(text: 'No estas registrado? '),
|
||||||
|
WidgetSpan(
|
||||||
|
child: GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
Navigator.pushNamed(context, '/register');
|
||||||
|
},
|
||||||
|
child: const Text(
|
||||||
|
'Registrarse',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 16.0,
|
||||||
|
color: Color(0xFF2BA4EC),
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user