mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix: loading status widget on the signup page flickers.
This commit is contained in:
parent
104851d330
commit
9dc209bda7
@ -71,6 +71,8 @@ class SignInForm extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final isSubmitting = context.read<SignInBloc>().state.isSubmitting;
|
||||
const indicatorMinHeight = 4.0;
|
||||
return Align(
|
||||
alignment: Alignment.center,
|
||||
child: AuthFormContainer(
|
||||
@ -104,13 +106,19 @@ class SignInForm extends StatelessWidget {
|
||||
const VSpace(10),
|
||||
const ThirdPartySignInButtons(),
|
||||
const VSpace(20),
|
||||
|
||||
// loading status
|
||||
if (context.read<SignInBloc>().state.isSubmitting) ...[
|
||||
const SizedBox(height: 8),
|
||||
const LinearProgressIndicator(value: null),
|
||||
const VSpace(20),
|
||||
],
|
||||
...isSubmitting
|
||||
? [
|
||||
const VSpace(indicatorMinHeight),
|
||||
const LinearProgressIndicator(
|
||||
value: null,
|
||||
minHeight: indicatorMinHeight,
|
||||
),
|
||||
]
|
||||
: [
|
||||
const VSpace(indicatorMinHeight * 2.0)
|
||||
], // add the same space when there's no loading status.
|
||||
const VSpace(20)
|
||||
],
|
||||
),
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user