This commit is contained in:
Phaung Phaung
2021-09-10 12:02:08 +06:30
parent a144c945b6
commit c06ae00b68
35 changed files with 190 additions and 223 deletions

View File

@@ -18,18 +18,19 @@ const resend_count_sec = 30;
class SmsCodePage extends StatefulWidget {
final String phoneNumber;
const SmsCodePage({Key key, this.phoneNumber}) : super(key: key);
const SmsCodePage({Key? key, required this.phoneNumber}) : super(key: key);
@override
_SmsCodePageState createState() => _SmsCodePageState();
}
class _SmsCodePageState extends State<SmsCodePage> {
bool _isLoading = false;
String pin;
bool allNumberEntered;
Timer _timer;
int _start = resend_count_sec;
bool canResend = false;
int _start = resend_count_sec;
late String pin;
late bool allNumberEntered;
late Timer _timer;
@override
void initState() {
@@ -116,7 +117,7 @@ class _SmsCodePageState extends State<SmsCodePage> {
pinLength: 6,
decoration: BoxLooseDecoration(
strokeColorBuilder: PinListenColorBuilder(
primaryColor, Colors.grey[400])),
primaryColor, Colors.grey.shade400)),
textInputAction: TextInputAction.done,
autoFocus: true,
onChanged: _pinChange,
@@ -133,13 +134,13 @@ class _SmsCodePageState extends State<SmsCodePage> {
child: LocalText(context, 'sms.resend',
fontSize: 16,
color:
canResend ? primaryColor : Colors.grey[400]),
canResend ? primaryColor : Colors.grey.shade400),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
side: BorderSide(
color: canResend
? primaryColor
: Colors.grey[400])),
: Colors.grey.shade400)),
),
InkWell(
onTap: allNumberEntered ? _verify : null,