Skip to content

Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.

fix: loading status widget on the signup page flickers.

Lucas.Xu9dc209bda7fa
diff --git a/frontend/appflowy_flutter/lib/user/presentation/sign_in_screen.dart b/frontend/appflowy_flutter/lib/user/presentation/sign_in_screen.dart
index 8548a483a8..0616e91455 100644
--- a/frontend/appflowy_flutter/lib/user/presentation/sign_in_screen.dart
+++ b/frontend/appflowy_flutter/lib/user/presentation/sign_in_screen.dart
@@ -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)
],
),
);