【发布时间】:2020-11-02 20:27:43
【问题描述】:
我正在使用 Firebase 进行电话身份验证,这里当我单击验证按钮时我想显示循环进度指示器,我该怎么做?
这是我的代码
Container(
width: verifyButton,
child: CustomButton(msg: "verify",onTap:(){
codeSent
? AuthService().signInWithOTP(smsCode, verificationId)
: verifyPhone(phoneNo);
}),
),
codeSent ? Padding(
padding: EdgeInsets.only(left: 12.0, right: 12.0, bottom: 12),
child: Container(
decoration: BoxDecoration(
color: Colors.white,
border: Border.all(color: Colors.black, width: 0.2),
borderRadius: BorderRadius.circular(20),
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.3),
offset: Offset(2, 1),
blurRadius: 2
)
]
),
child: Padding(
padding: const EdgeInsets.only(left: 25.0, right: 25.0),
child: TextFormField(
keyboardType: TextInputType.phone,
decoration: InputDecoration(hintText: 'Enter OTP'),
onChanged: (val) {
setState(() {
this.smsCode = val;
});
},
),
)))
【问题讨论】:
标签: firebase flutter firebase-authentication flutter-layout flutter-dependencies