Move loading into fab button of login
This commit is contained in:
parent
e478552587
commit
9c93ea1008
|
@ -32,6 +32,7 @@ class _LoginPageState extends State<LoginPage> {
|
|||
print("Error signing in $error");
|
||||
setState(() {
|
||||
failedMessage = error.toString();
|
||||
loggingIn = false;
|
||||
});
|
||||
|
||||
Future.delayed(const Duration(seconds: 10), () {
|
||||
|
@ -99,14 +100,13 @@ class _LoginPageState extends State<LoginPage> {
|
|||
),
|
||||
),
|
||||
),
|
||||
floatingActionButton: loggingIn
|
||||
? const CircularProgressIndicator()
|
||||
: FloatingActionButton(
|
||||
onPressed: connectMatrix,
|
||||
floatingActionButton: FloatingActionButton(
|
||||
onPressed: loggingIn ? null : connectMatrix,
|
||||
tooltip: 'Log in',
|
||||
child: const Icon(Icons.login),
|
||||
),
|
||||
),
|
||||
child: loggingIn
|
||||
? const CircularProgressIndicator()
|
||||
: const Icon(Icons.login),
|
||||
)),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user