diff --git a/packages/deriv_auth_ui/lib/src/features/login/layouts/deriv_login_layout.dart b/packages/deriv_auth_ui/lib/src/features/login/layouts/deriv_login_layout.dart index 9671a72a8..a2338bf8e 100644 --- a/packages/deriv_auth_ui/lib/src/features/login/layouts/deriv_login_layout.dart +++ b/packages/deriv_auth_ui/lib/src/features/login/layouts/deriv_login_layout.dart @@ -22,6 +22,8 @@ class DerivLoginLayout extends StatefulWidget { required this.onSocialAuthButtonPressed, required this.welcomeLabel, required this.greetingLabel, + this.isForgotPasswordEnabled = true, + this.isCreateAccountEnabled = true, this.isSocialAuthEnabled = true, this.authErrorStateHandler, this.onLoginError, @@ -59,6 +61,12 @@ class DerivLoginLayout extends StatefulWidget { /// Whether to display social auth buttons. final bool isSocialAuthEnabled; + /// Whether to display forgot password section. + final bool isForgotPasswordEnabled; + + /// Whether to display create account section. + final bool isCreateAccountEnabled; + @override State createState() => _DerivLoginLayoutState(); } @@ -112,7 +120,9 @@ class _DerivLoginLayoutState extends State { ..._buildTextFields( isEnabled: state is! DerivAuthLoadingState), const SizedBox(height: ThemeProvider.margin24), - _buildForgotPassButton(), + widget.isForgotPasswordEnabled + ? _buildForgotPassButton() + : const SizedBox(), const SizedBox(height: ThemeProvider.margin24), _buildLoginButton(), const SizedBox(height: ThemeProvider.margin24), @@ -129,7 +139,9 @@ class _DerivLoginLayoutState extends State { ), if (widget.isSocialAuthEnabled) const SizedBox(height: ThemeProvider.margin24), - _buildFooterSection(), + widget.isCreateAccountEnabled + ? _buildFooterSection() + : const SizedBox(), ], ), ),