child: RaisedButton(
color: AppColors.darkGreenColor,
onPressed: () async{
passwordController.text == '' ||concatePhoneNumber == '' ? Get.snackbar("Please Enter Mobile or Password", '',colorText: Colors.white,backgroundColor: AppColors.darkGreenColor):
loginUser();
},
child: Text(AppString.login,
style:AppTextStyles.appTextStyle(fontSize: 16, fontWeight: FontWeight.bold, color: Colors.white
)
),
),
Following is the code for loginUser() function
loginUser() {
final form = _formKey.currentState;
if (form!.validate()) {
form.save();
var jsonData = {
"phone_number": concatePhoneNumber,
"password": passwordController.text,
};
loginController.loginUser(jsonData);
}
}
I want to show circular progress bar on whole screen until data is loaded while pressing login button