auth phone and re auth phone
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:flutter_otp_text_field/flutter_otp_text_field.dart';
|
||||
@@ -16,6 +17,7 @@ class OtpAuthScreen extends StatefulWidget {
|
||||
|
||||
class _OtpAuthScreenState extends State<OtpAuthScreen> {
|
||||
late final AuthBloc authBloc;
|
||||
late String verificationCode = '';
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@@ -47,7 +49,7 @@ class _OtpAuthScreenState extends State<OtpAuthScreen> {
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
SizedBox(height: MediaQuery.of(context).size.height * 0.1),
|
||||
const Text('Te enviaremos un Código de verificación a'),
|
||||
const Text('Te enviaremos un código de verificación a'),
|
||||
Text(
|
||||
widget.phoneNumber,
|
||||
style: const TextStyle(
|
||||
@@ -60,14 +62,18 @@ class _OtpAuthScreenState extends State<OtpAuthScreen> {
|
||||
numberOfFields: 6,
|
||||
borderColor: const Color(0xFF512DA8),
|
||||
showFieldAsBox: true,
|
||||
onCodeChanged: (String code) {},
|
||||
onCodeChanged: (String code) {
|
||||
verificationCode = code;
|
||||
},
|
||||
onSubmit: (String verificationCode) {
|
||||
authBloc.add(AuthEventVerifyOAuth(code: verificationCode));
|
||||
},
|
||||
),
|
||||
Expanded(child: Container()),
|
||||
GeneralPrimaryButton(
|
||||
onPressed: () {},
|
||||
onPressed: () {
|
||||
authBloc.add(AuthEventVerifyOAuth(code: verificationCode));
|
||||
},
|
||||
label: 'Continuar',
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
|
||||
Reference in New Issue
Block a user