I want to add elevated with circularprogressIndicator
I want to add this circular Progress Indicator in my sign up option this is my container for sign up option
Container(
height: 45,
width: double.infinity,
decoration: const ShapeDecoration(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(4)))),
child: ElevatedButton(
onPressed: () async {
String res = await AuthMethods().signUpUser(
email: _emailController.text,
password: _passwordController.text,
username: _usernameController.text,
bio: _bioController.text,
file: _image!);
print(res);
},
child: Text("Sign up"),
),
),
where should i add circular Progress indicator this is code for "_isLoading
? const Center(
child: CircularProgressIndicator(
color: Colors.white,
),
)
:"
So when i click on sign up button it run as circularprogressIndicator on it .
2
Answers
Use Async Button :
Example:
We can display a circular progress indicator when the signup process is ongoing.