mirror of
https://github.com/Iconica-Development/flutter_login_widget.git
synced 2025-05-18 21:23:44 +02:00
Merge pull request #9 from Iconica-Development/feature/expand_translations
fix: change to options instead of translations
This commit is contained in:
commit
92a1af6d72
6 changed files with 17 additions and 17 deletions
|
@ -1,5 +1,5 @@
|
|||
## 2.0.2
|
||||
* Added more translatable options
|
||||
## 3.0.0
|
||||
* Added login options to loginbuilders for more customization
|
||||
|
||||
## 2.0.1
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ packages:
|
|||
path: ".."
|
||||
relative: true
|
||||
source: path
|
||||
version: "2.0.2"
|
||||
version: "3.0.0"
|
||||
flutter_test:
|
||||
dependency: "direct dev"
|
||||
description: flutter
|
||||
|
|
|
@ -84,13 +84,13 @@ Widget _createLoginButton(
|
|||
OptionalAsyncCallback onPressed,
|
||||
bool disabled,
|
||||
OptionalAsyncCallback onDisabledPress,
|
||||
LoginTranslations translations,
|
||||
LoginOptions options,
|
||||
) {
|
||||
return Opacity(
|
||||
opacity: disabled ? 0.5 : 1.0,
|
||||
child: ElevatedButton(
|
||||
onPressed: !disabled ? onPressed : onDisabledPress,
|
||||
child: Text(translations.loginButton),
|
||||
child: Text(options.translations.loginButton),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
@ -100,13 +100,13 @@ Widget _createForgotPasswordButton(
|
|||
OptionalAsyncCallback onPressed,
|
||||
bool disabled,
|
||||
OptionalAsyncCallback onDisabledPress,
|
||||
LoginTranslations translations,
|
||||
LoginOptions options,
|
||||
) {
|
||||
return Opacity(
|
||||
opacity: disabled ? 0.5 : 1.0,
|
||||
child: ElevatedButton(
|
||||
onPressed: !disabled ? onPressed : onDisabledPress,
|
||||
child: Text(translations.forgotPasswordButton),
|
||||
child: Text(options.translations.forgotPasswordButton),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
@ -116,13 +116,13 @@ Widget _createRequestForgotPasswordButton(
|
|||
OptionalAsyncCallback onPressed,
|
||||
bool disabled,
|
||||
OptionalAsyncCallback onDisabledPress,
|
||||
LoginTranslations translations,
|
||||
LoginOptions options,
|
||||
) {
|
||||
return Opacity(
|
||||
opacity: disabled ? 0.5 : 1.0,
|
||||
child: ElevatedButton(
|
||||
onPressed: !disabled ? onPressed : onDisabledPress,
|
||||
child: Text(translations.requestForgotPasswordButton),
|
||||
child: Text(options.translations.requestForgotPasswordButton),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
@ -132,13 +132,13 @@ Widget _createRegisterButton(
|
|||
OptionalAsyncCallback onPressed,
|
||||
bool disabled,
|
||||
OptionalAsyncCallback onDisabledPress,
|
||||
LoginTranslations translations,
|
||||
LoginOptions options,
|
||||
) {
|
||||
return Opacity(
|
||||
opacity: disabled ? 0.5 : 1.0,
|
||||
child: ElevatedButton(
|
||||
onPressed: !disabled ? onPressed : onDisabledPress,
|
||||
child: Text(translations.registrationButton),
|
||||
child: Text(options.translations.registrationButton),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
@ -148,7 +148,7 @@ typedef ButtonBuilder = Widget Function(
|
|||
OptionalAsyncCallback onPressed,
|
||||
bool isDisabled,
|
||||
OptionalAsyncCallback onDisabledPress,
|
||||
LoginTranslations options,
|
||||
LoginOptions options,
|
||||
);
|
||||
|
||||
typedef InputContainerBuilder = Widget Function(
|
||||
|
|
|
@ -162,7 +162,7 @@ class _EmailPasswordLoginFormState extends State<EmailPasswordLoginForm> {
|
|||
},
|
||||
false,
|
||||
() {},
|
||||
options.translations,
|
||||
options,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
@ -177,7 +177,7 @@ class _EmailPasswordLoginFormState extends State<EmailPasswordLoginForm> {
|
|||
() {
|
||||
_formKey.currentState?.validate();
|
||||
},
|
||||
options.translations,
|
||||
options,
|
||||
);
|
||||
},
|
||||
),
|
||||
|
@ -192,7 +192,7 @@ class _EmailPasswordLoginFormState extends State<EmailPasswordLoginForm> {
|
|||
},
|
||||
false,
|
||||
() {},
|
||||
options.translations,
|
||||
options,
|
||||
),
|
||||
]
|
||||
],
|
||||
|
|
|
@ -133,7 +133,7 @@ class _ForgotPasswordFormState extends State<ForgotPasswordForm> {
|
|||
() {
|
||||
_formKey.currentState?.validate();
|
||||
},
|
||||
options.translations,
|
||||
options,
|
||||
),
|
||||
);
|
||||
},
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
name: flutter_login
|
||||
description: A new Flutter package project.
|
||||
version: 2.0.2
|
||||
version: 3.0.0
|
||||
|
||||
environment:
|
||||
sdk: ">=2.18.1 <3.0.0"
|
||||
|
|
Loading…
Reference in a new issue