mirror of
https://github.com/Iconica-Development/flutter_login_widget.git
synced 2025-05-19 13:43: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
|
## 3.0.0
|
||||||
* Added more translatable options
|
* Added login options to loginbuilders for more customization
|
||||||
|
|
||||||
## 2.0.1
|
## 2.0.1
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ packages:
|
||||||
path: ".."
|
path: ".."
|
||||||
relative: true
|
relative: true
|
||||||
source: path
|
source: path
|
||||||
version: "2.0.2"
|
version: "3.0.0"
|
||||||
flutter_test:
|
flutter_test:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description: flutter
|
description: flutter
|
||||||
|
|
|
@ -84,13 +84,13 @@ Widget _createLoginButton(
|
||||||
OptionalAsyncCallback onPressed,
|
OptionalAsyncCallback onPressed,
|
||||||
bool disabled,
|
bool disabled,
|
||||||
OptionalAsyncCallback onDisabledPress,
|
OptionalAsyncCallback onDisabledPress,
|
||||||
LoginTranslations translations,
|
LoginOptions options,
|
||||||
) {
|
) {
|
||||||
return Opacity(
|
return Opacity(
|
||||||
opacity: disabled ? 0.5 : 1.0,
|
opacity: disabled ? 0.5 : 1.0,
|
||||||
child: ElevatedButton(
|
child: ElevatedButton(
|
||||||
onPressed: !disabled ? onPressed : onDisabledPress,
|
onPressed: !disabled ? onPressed : onDisabledPress,
|
||||||
child: Text(translations.loginButton),
|
child: Text(options.translations.loginButton),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -100,13 +100,13 @@ Widget _createForgotPasswordButton(
|
||||||
OptionalAsyncCallback onPressed,
|
OptionalAsyncCallback onPressed,
|
||||||
bool disabled,
|
bool disabled,
|
||||||
OptionalAsyncCallback onDisabledPress,
|
OptionalAsyncCallback onDisabledPress,
|
||||||
LoginTranslations translations,
|
LoginOptions options,
|
||||||
) {
|
) {
|
||||||
return Opacity(
|
return Opacity(
|
||||||
opacity: disabled ? 0.5 : 1.0,
|
opacity: disabled ? 0.5 : 1.0,
|
||||||
child: ElevatedButton(
|
child: ElevatedButton(
|
||||||
onPressed: !disabled ? onPressed : onDisabledPress,
|
onPressed: !disabled ? onPressed : onDisabledPress,
|
||||||
child: Text(translations.forgotPasswordButton),
|
child: Text(options.translations.forgotPasswordButton),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -116,13 +116,13 @@ Widget _createRequestForgotPasswordButton(
|
||||||
OptionalAsyncCallback onPressed,
|
OptionalAsyncCallback onPressed,
|
||||||
bool disabled,
|
bool disabled,
|
||||||
OptionalAsyncCallback onDisabledPress,
|
OptionalAsyncCallback onDisabledPress,
|
||||||
LoginTranslations translations,
|
LoginOptions options,
|
||||||
) {
|
) {
|
||||||
return Opacity(
|
return Opacity(
|
||||||
opacity: disabled ? 0.5 : 1.0,
|
opacity: disabled ? 0.5 : 1.0,
|
||||||
child: ElevatedButton(
|
child: ElevatedButton(
|
||||||
onPressed: !disabled ? onPressed : onDisabledPress,
|
onPressed: !disabled ? onPressed : onDisabledPress,
|
||||||
child: Text(translations.requestForgotPasswordButton),
|
child: Text(options.translations.requestForgotPasswordButton),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -132,13 +132,13 @@ Widget _createRegisterButton(
|
||||||
OptionalAsyncCallback onPressed,
|
OptionalAsyncCallback onPressed,
|
||||||
bool disabled,
|
bool disabled,
|
||||||
OptionalAsyncCallback onDisabledPress,
|
OptionalAsyncCallback onDisabledPress,
|
||||||
LoginTranslations translations,
|
LoginOptions options,
|
||||||
) {
|
) {
|
||||||
return Opacity(
|
return Opacity(
|
||||||
opacity: disabled ? 0.5 : 1.0,
|
opacity: disabled ? 0.5 : 1.0,
|
||||||
child: ElevatedButton(
|
child: ElevatedButton(
|
||||||
onPressed: !disabled ? onPressed : onDisabledPress,
|
onPressed: !disabled ? onPressed : onDisabledPress,
|
||||||
child: Text(translations.registrationButton),
|
child: Text(options.translations.registrationButton),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -148,7 +148,7 @@ typedef ButtonBuilder = Widget Function(
|
||||||
OptionalAsyncCallback onPressed,
|
OptionalAsyncCallback onPressed,
|
||||||
bool isDisabled,
|
bool isDisabled,
|
||||||
OptionalAsyncCallback onDisabledPress,
|
OptionalAsyncCallback onDisabledPress,
|
||||||
LoginTranslations options,
|
LoginOptions options,
|
||||||
);
|
);
|
||||||
|
|
||||||
typedef InputContainerBuilder = Widget Function(
|
typedef InputContainerBuilder = Widget Function(
|
||||||
|
|
|
@ -162,7 +162,7 @@ class _EmailPasswordLoginFormState extends State<EmailPasswordLoginForm> {
|
||||||
},
|
},
|
||||||
false,
|
false,
|
||||||
() {},
|
() {},
|
||||||
options.translations,
|
options,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
@ -177,7 +177,7 @@ class _EmailPasswordLoginFormState extends State<EmailPasswordLoginForm> {
|
||||||
() {
|
() {
|
||||||
_formKey.currentState?.validate();
|
_formKey.currentState?.validate();
|
||||||
},
|
},
|
||||||
options.translations,
|
options,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
@ -192,7 +192,7 @@ class _EmailPasswordLoginFormState extends State<EmailPasswordLoginForm> {
|
||||||
},
|
},
|
||||||
false,
|
false,
|
||||||
() {},
|
() {},
|
||||||
options.translations,
|
options,
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
|
|
@ -133,7 +133,7 @@ class _ForgotPasswordFormState extends State<ForgotPasswordForm> {
|
||||||
() {
|
() {
|
||||||
_formKey.currentState?.validate();
|
_formKey.currentState?.validate();
|
||||||
},
|
},
|
||||||
options.translations,
|
options,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
name: flutter_login
|
name: flutter_login
|
||||||
description: A new Flutter package project.
|
description: A new Flutter package project.
|
||||||
version: 2.0.2
|
version: 3.0.0
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.18.1 <3.0.0"
|
sdk: ">=2.18.1 <3.0.0"
|
||||||
|
|
Loading…
Reference in a new issue