numero update

This commit is contained in:
Juan Felipe Duarte
2023-06-15 10:55:17 -05:00
parent 6cdc6ce5d7
commit cdb96fb627
+28 -33
View File
@@ -99,8 +99,21 @@ class _LoginScreenState extends State<LoginScreen> {
), ),
), ),
const SizedBox(height: 20), const SizedBox(height: 20),
ButtonBottom( PrimaryButtom(
formKey: _formKey, completePhoneNumber: completePhoneNumber), onPressed: () {
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),
const GestureBottom(), const GestureBottom(),
const SizedBox(height: 20), const SizedBox(height: 20),
@@ -211,37 +224,7 @@ class _LoginScreenState extends State<LoginScreen> {
), ),
), ),
const SizedBox(height: 20), const SizedBox(height: 20),
ButtonBottom( PrimaryButtom(
formKey: _formKey,
completePhoneNumber: completePhoneNumber),
const SizedBox(height: 20),
const GestureBottom(),
const SizedBox(height: 20),
const RichTxTBottom(),
],
),
),
),
],
),
),
);
}
}
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: () { onPressed: () {
if (_formKey.currentState!.validate()) { if (_formKey.currentState!.validate()) {
PhoneAuthController.instance.phoneAuthentication( PhoneAuthController.instance.phoneAuthentication(
@@ -255,6 +238,18 @@ class ButtonBottom extends StatelessWidget {
} }
}, },
label: 'Enviar código', label: 'Enviar código',
),
const SizedBox(height: 20),
const GestureBottom(),
const SizedBox(height: 20),
const RichTxTBottom(),
],
),
),
),
],
),
),
); );
} }
} }