feat: showLoginTitle option

This commit is contained in:
Stein Milder 2022-09-27 11:15:03 +02:00
parent ebe6d8a9e9
commit 5b63dbb2e2
2 changed files with 11 additions and 7 deletions

View file

@ -143,6 +143,7 @@ class ConfigData {
class LoginOptions { class LoginOptions {
const LoginOptions({ const LoginOptions({
this.showLoginTitle = true,
this.loginImage = '', this.loginImage = '',
this.loginEmail, this.loginEmail,
this.loginPassword, this.loginPassword,
@ -157,6 +158,8 @@ class LoginOptions {
this.onPressForgotPassword, this.onPressForgotPassword,
}); });
final bool showLoginTitle;
/// The mode determining the login actions required to use the app. /// The mode determining the login actions required to use the app.
/// ///
/// [LoginMode.LoginAutomatic] Will automatically log in with [loginAccount] /// [LoginMode.LoginAutomatic] Will automatically log in with [loginAccount]

View file

@ -163,14 +163,15 @@ class EmailLoginState extends LoginState<EmailPasswordLogin> {
return Column( return Column(
children: <Widget>[ children: <Widget>[
Container( if (FlutterLogin.of(context).config.loginOptions.showLoginTitle)
padding: const EdgeInsets.only(top: 60), Container(
alignment: Alignment.topCenter, padding: const EdgeInsets.only(top: 60),
child: Text( alignment: Alignment.topCenter,
context.translate('login.text.title'), child: Text(
style: Theme.of(context).textTheme.headline6, context.translate('login.text.title'),
style: Theme.of(context).textTheme.headline6,
),
), ),
),
Container( Container(
padding: const EdgeInsets.only(top: 10), padding: const EdgeInsets.only(top: 10),
alignment: Alignment.topCenter, alignment: Alignment.topCenter,