ui_claims_pop_up_chngs
This commit is contained in:
parent
58b32005e9
commit
cb82278834
@ -52,15 +52,15 @@ class _loginState extends State<login> {
|
|||||||
final SharedPreferences prefs = await SharedPreferences.getInstance();
|
final SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||||
// final skipStatus = prefs.getInt('skipStatus') ?? 1;
|
// final skipStatus = prefs.getInt('skipStatus') ?? 1;
|
||||||
// if(skipStatus == 0){
|
// if(skipStatus == 0){
|
||||||
empMobileNo = prefs.getString('empMobileNo');
|
empMobileNo = prefs.getString('empMobileNo');
|
||||||
empEmailid = prefs.getString('empEmailid');
|
empEmailid = prefs.getString('empEmailid');
|
||||||
if ((empMobileNo != null && empMobileNo.isNotEmpty) || (empEmailid != null && empEmailid.isNotEmpty)) {
|
if ((empMobileNo != null && empMobileNo.isNotEmpty) ||
|
||||||
checkLoginPin(context);
|
(empEmailid != null && empEmailid.isNotEmpty)) {
|
||||||
}
|
checkLoginPin(context);
|
||||||
|
}
|
||||||
// }
|
// }
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if(kIsWeb) {
|
if (kIsWeb) {
|
||||||
final SharedPreferences prefs = await SharedPreferences.getInstance();
|
final SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||||
prefs.clear();
|
prefs.clear();
|
||||||
print('Local Storage Clear');
|
print('Local Storage Clear');
|
||||||
@ -74,13 +74,13 @@ class _loginState extends State<login> {
|
|||||||
final SharedPreferences prefs = await SharedPreferences.getInstance();
|
final SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||||
empMobileNo = prefs.getString('empMobileNo');
|
empMobileNo = prefs.getString('empMobileNo');
|
||||||
empEmailid = prefs.getString('empEmailid');
|
empEmailid = prefs.getString('empEmailid');
|
||||||
print('empMobileNo $empMobileNo' );
|
print('empMobileNo $empMobileNo');
|
||||||
print('empEmailid $empEmailid');
|
print('empEmailid $empEmailid');
|
||||||
// _token = prefs.getString('token');
|
// _token = prefs.getString('token');
|
||||||
var params = {};
|
var params = {};
|
||||||
if (empMobileNo != null && empMobileNo.isNotEmpty) {
|
if (empMobileNo != null && empMobileNo.isNotEmpty) {
|
||||||
params = {'mobile_number': empMobileNo};
|
params = {'mobile_number': empMobileNo};
|
||||||
} else if(empEmailid != null && empEmailid.isNotEmpty){
|
} else if (empEmailid != null && empEmailid.isNotEmpty) {
|
||||||
params = {'email_id': empEmailid};
|
params = {'email_id': empEmailid};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -105,18 +105,19 @@ class _loginState extends State<login> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (data['is_biometric_enabled'] != null) {
|
if (data['is_biometric_enabled'] != null) {
|
||||||
prefs.setString('is_biometric_enabled', data['is_biometric_enabled']);
|
prefs.setString(
|
||||||
|
'is_biometric_enabled', data['is_biometric_enabled']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data['is_mpin_skipped'] != null) {
|
if (data['is_mpin_skipped'] != null) {
|
||||||
prefs.setString('is_mpin_skipped', data['is_mpin_skipped']);
|
prefs.setString('is_mpin_skipped', data['is_mpin_skipped']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data['is_mpin_skipped'] != null && data['is_mpin_skipped'] == '0') {
|
if (data['is_mpin_skipped'] != null &&
|
||||||
|
data['is_mpin_skipped'] == '0') {
|
||||||
context.go('/pinPage');
|
context.go('/pinPage');
|
||||||
// Navigator.pushReplacementNamed(context, 'pinPage');
|
// Navigator.pushReplacementNamed(context, 'pinPage');
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
final SharedPreferences prefs = await SharedPreferences.getInstance();
|
final SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||||
prefs.clear();
|
prefs.clear();
|
||||||
@ -131,12 +132,12 @@ class _loginState extends State<login> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void toggleField() async{
|
void toggleField() async {
|
||||||
// final SharedPreferences prefs = await SharedPreferences.getInstance();
|
// final SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||||
if(isEmailFieldVisible){
|
if (isEmailFieldVisible) {
|
||||||
mobileController.text = '';
|
mobileController.text = '';
|
||||||
} else{
|
} else {
|
||||||
emailController.text = '';
|
emailController.text = '';
|
||||||
}
|
}
|
||||||
setState(() {
|
setState(() {
|
||||||
isEmailFieldVisible = !isEmailFieldVisible;
|
isEmailFieldVisible = !isEmailFieldVisible;
|
||||||
@ -429,8 +430,7 @@ class _loginState extends State<login> {
|
|||||||
children: [
|
children: [
|
||||||
Column(
|
Column(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
SizedBox(height: _size.height / 6.4),
|
||||||
height: _size.height / 6.4),
|
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment
|
mainAxisAlignment: MainAxisAlignment
|
||||||
.center, // Align to the center
|
.center, // Align to the center
|
||||||
@ -940,7 +940,8 @@ class _loginState extends State<login> {
|
|||||||
.click,
|
.click,
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
context.go('/privacypolicy');
|
context.go(
|
||||||
|
'/privacypolicy');
|
||||||
// Navigator.pushNamed(
|
// Navigator.pushNamed(
|
||||||
// context,
|
// context,
|
||||||
// 'privacypolicy');
|
// 'privacypolicy');
|
||||||
@ -973,7 +974,8 @@ class _loginState extends State<login> {
|
|||||||
.click,
|
.click,
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
context.go('/termsofuse');
|
context
|
||||||
|
.go('/termsofuse');
|
||||||
// Navigator.pushNamed(
|
// Navigator.pushNamed(
|
||||||
// context,
|
// context,
|
||||||
// 'termsofuse');
|
// 'termsofuse');
|
||||||
|
|||||||
@ -54,9 +54,22 @@ class PopupHelper {
|
|||||||
barrierDismissible: false,
|
barrierDismissible: false,
|
||||||
builder: (BuildContext dialogContext) {
|
builder: (BuildContext dialogContext) {
|
||||||
final double dialogWidth =
|
final double dialogWidth =
|
||||||
isMobile ? MediaQuery.of(context).size.width * 0.85 : 400;
|
isMobile ? MediaQuery.of(context).size.width * 0.85 : 400;
|
||||||
final double dialogHeight =
|
final double dialogHeight =
|
||||||
isMobile ? MediaQuery.of(context).size.height * 0.17 : 150;
|
isMobile ? MediaQuery.of(context).size.height * 0.17 : 150;
|
||||||
|
|
||||||
|
// Auto close after 3 seconds and redirect
|
||||||
|
Future.delayed(const Duration(seconds: 2), () {
|
||||||
|
if (Navigator.of(dialogContext).canPop()) {
|
||||||
|
Navigator.of(dialogContext).pop();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (wellnessURL != null) {
|
||||||
|
launchURL(wellnessURL, context);
|
||||||
|
} else {
|
||||||
|
ToastHelper.showInfoToast(context, 'Invalid link or unavailable');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// Auto close after 3 seconds and redirect
|
// Auto close after 3 seconds and redirect
|
||||||
Future.delayed(const Duration(seconds: 2), () {
|
Future.delayed(const Duration(seconds: 2), () {
|
||||||
@ -170,9 +183,9 @@ class PopupHelper {
|
|||||||
barrierDismissible: false,
|
barrierDismissible: false,
|
||||||
builder: (BuildContext dialogContext) {
|
builder: (BuildContext dialogContext) {
|
||||||
final double dialogWidth =
|
final double dialogWidth =
|
||||||
isMobile ? MediaQuery.of(context).size.width * 0.8 : 400;
|
isMobile ? MediaQuery.of(context).size.width * 0.8 : 400;
|
||||||
final double dialogHeight =
|
final double dialogHeight =
|
||||||
isMobile ? MediaQuery.of(context).size.height * 0.15 : 130;
|
isMobile ? MediaQuery.of(context).size.height * 0.15 : 130;
|
||||||
|
|
||||||
return Dialog(
|
return Dialog(
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user