|
|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
import 'dart:async';
|
|
|
|
|
|
|
|
|
|
import 'package:doctor_app_flutter/config/config.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/enum/auth_method_types.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
|
|
|
|
|
@ -20,10 +21,6 @@ class SMSOTP {
|
|
|
|
|
|
|
|
|
|
Future<Null> timer;
|
|
|
|
|
|
|
|
|
|
static BuildContext _context;
|
|
|
|
|
|
|
|
|
|
static bool _loading;
|
|
|
|
|
|
|
|
|
|
SMSOTP(
|
|
|
|
|
this.context,
|
|
|
|
|
this.type,
|
|
|
|
|
@ -285,8 +282,6 @@ class SMSOTP {
|
|
|
|
|
InputDecoration buildInputDecoration(BuildContext context) {
|
|
|
|
|
return InputDecoration(
|
|
|
|
|
counterText: " ",
|
|
|
|
|
// ts/images/password_icon.png
|
|
|
|
|
// contentPadding: EdgeInsets.only(top: 20, bottom: 20),
|
|
|
|
|
enabledBorder: OutlineInputBorder(
|
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(10)),
|
|
|
|
|
borderSide: BorderSide(color: Colors.grey[300]),
|
|
|
|
|
@ -306,6 +301,7 @@ class SMSOTP {
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ignore: missing_return
|
|
|
|
|
String validateCodeDigit(value) {
|
|
|
|
|
if (value.isEmpty) {
|
|
|
|
|
return ' ';
|
|
|
|
|
@ -317,7 +313,6 @@ class SMSOTP {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
checkValue() {
|
|
|
|
|
//print(verifyAccountFormValue);
|
|
|
|
|
if (verifyAccountForm.currentState.validate()) {
|
|
|
|
|
onSuccess(digit1.text.toString() +
|
|
|
|
|
digit2.text.toString() +
|
|
|
|
|
@ -343,6 +338,7 @@ class SMSOTP {
|
|
|
|
|
|
|
|
|
|
startTimer(setState) {
|
|
|
|
|
this.remainingTime--;
|
|
|
|
|
print(isClosed);
|
|
|
|
|
setState(() {
|
|
|
|
|
displayTime = this.getSecondsAsDigitalClock(this.remainingTime);
|
|
|
|
|
});
|
|
|
|
|
@ -355,34 +351,4 @@ class SMSOTP {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void showLoadingDialog(BuildContext context, bool _loading) async {
|
|
|
|
|
_context = context;
|
|
|
|
|
|
|
|
|
|
if (_loading == false) {
|
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
_loading = true;
|
|
|
|
|
await showDialog(
|
|
|
|
|
context: _context,
|
|
|
|
|
barrierDismissible: false,
|
|
|
|
|
builder: (BuildContext context) {
|
|
|
|
|
return SimpleDialog(
|
|
|
|
|
elevation: 0.0,
|
|
|
|
|
backgroundColor: Colors.transparent,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Center(
|
|
|
|
|
child: CircularProgressIndicator(
|
|
|
|
|
valueColor: AlwaysStoppedAnimation<Color>(Colors.black),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void hideSMSBox(context) {
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|