mirror of
https://github.com/Iconica-Development/flutter_registration.git
synced 2025-05-19 05:23:43 +02:00
Merge pull request #24 from Iconica-Development/bugfix/input-values-clearing
fix: input values clearing on next step
This commit is contained in:
commit
05b143a5bd
5 changed files with 129 additions and 90 deletions
|
@ -4,6 +4,9 @@ SPDX-FileCopyrightText: 2022 Iconica
|
|||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
-->
|
||||
|
||||
# 2.0.2
|
||||
- fix: fixed the issue with values not being saved when calling nextStep.
|
||||
|
||||
# 2.0.1
|
||||
- feat: added circular progress indicator while awaiting registration of user
|
||||
- feat: added alignment option for buttons
|
||||
|
|
|
@ -227,6 +227,25 @@ class _AuthScreenState extends State<AuthScreen> {
|
|||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
Expanded(
|
||||
flex: widget.formFlex ?? 3,
|
||||
child: Align(
|
||||
child: Column(
|
||||
children: [
|
||||
for (AuthField field
|
||||
in widget.steps[i].fields) ...[
|
||||
if (field.title != null) ...[
|
||||
field.title!,
|
||||
],
|
||||
field.build(context, () {
|
||||
_validate(i);
|
||||
})
|
||||
]
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
Row(
|
||||
|
@ -294,14 +313,12 @@ class _AuthScreenState extends State<AuthScreen> {
|
|||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
widget.steps.last ==
|
||||
widget.steps[i]
|
||||
widget.steps.last == widget.steps[i]
|
||||
? widget.submitBtnTitle
|
||||
: widget.nextBtnTitle,
|
||||
),
|
||||
const Padding(
|
||||
padding:
|
||||
EdgeInsets.only(left: 4.0),
|
||||
padding: EdgeInsets.only(left: 4.0),
|
||||
child: Icon(
|
||||
Icons.arrow_forward,
|
||||
size: 18,
|
||||
|
@ -320,7 +337,6 @@ class _AuthScreenState extends State<AuthScreen> {
|
|||
],
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
@ -13,6 +13,10 @@ class RegistrationOptions {
|
|||
required this.registrationRepository,
|
||||
required this.registrationSteps,
|
||||
required this.afterRegistration,
|
||||
this.titleFlex,
|
||||
this.formFlex,
|
||||
this.beforeTitleFlex,
|
||||
this.afterTitleFlex,
|
||||
this.registrationTranslations = const RegistrationTranslations.empty(),
|
||||
this.onError,
|
||||
this.customAppbarBuilder,
|
||||
|
@ -62,6 +66,18 @@ class RegistrationOptions {
|
|||
/// A custom widget for displaying a login button.
|
||||
Widget? loginButton;
|
||||
|
||||
/// The number of flex units for the title.
|
||||
final int? titleFlex;
|
||||
|
||||
/// The number of flex units for the form.
|
||||
final int? formFlex;
|
||||
|
||||
/// The number of flex units for the buttons.
|
||||
final int? beforeTitleFlex;
|
||||
|
||||
/// The number of flex units for the buttons.
|
||||
final int? afterTitleFlex;
|
||||
|
||||
/// Generates default registration steps.
|
||||
///
|
||||
/// [emailController] controller for email input.
|
||||
|
|
|
@ -76,6 +76,10 @@ class RegistrationScreenState extends State<RegistrationScreen> {
|
|||
titleWidget: widget.registrationOptions.titleWidget,
|
||||
loginButton: widget.registrationOptions.loginButton,
|
||||
isLoading: _isLoading,
|
||||
titleFlex: widget.registrationOptions.titleFlex,
|
||||
formFlex: widget.registrationOptions.formFlex,
|
||||
beforeTitleFlex: widget.registrationOptions.beforeTitleFlex,
|
||||
afterTitleFlex: widget.registrationOptions.afterTitleFlex,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
name: flutter_registration
|
||||
description: A Flutter Registration package
|
||||
version: 2.0.1
|
||||
version: 2.0.2
|
||||
repository: https://github.com/Iconica-Development/flutter_registration
|
||||
|
||||
publish_to: none
|
||||
|
|
Loading…
Reference in a new issue