diff --git a/CHANGELOG.md b/CHANGELOG.md index 139e522..ab7b130 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 0.4.0 + +- **FIX**: Removed excessive whitespace from multi screen form summary. +- **FIX**: Added right padding to multi screen form navigation buttons. +- **FIX**: Removed `FormState.multiScreen` constructor which did not enforce the requirement of `MultiScreenFormState` by `Form.multiScreen`. + ## 0.3.0 - **FEAT**: Added multi screen form support. diff --git a/lib/src/components/form/form.dart b/lib/src/components/form/form.dart index ce269d4..0f756f8 100644 --- a/lib/src/components/form/form.dart +++ b/lib/src/components/form/form.dart @@ -18,7 +18,7 @@ class Form extends StatelessComponent { /// Creates a [Form] configured for multi-screen navigation. /// Each config is shown on its own screen with Back/Next buttons. - /// Requires [FormState.multiScreen] to be used as the state. + /// Requires [MultiScreenFormState] to be used as the state. const factory Form.multiScreen({ Key? key, required MultiScreenFormState state, diff --git a/lib/src/components/form/multi_screen_form.dart b/lib/src/components/form/multi_screen_form.dart index 5675b9e..b8f4bae 100644 --- a/lib/src/components/form/multi_screen_form.dart +++ b/lib/src/components/form/multi_screen_form.dart @@ -135,6 +135,7 @@ class _MultiScreenNavigationButtons extends StatelessComponent { }, focused: state.focusOnButton && state.focusedButtonIndex == 1, ), + const SizedBox(width: 1), ], ), ); @@ -168,13 +169,8 @@ class _SummaryScreen extends StatelessComponent { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - const SizedBox(height: 1), for (final config in configs) - _SummaryItem( - state: state, - config: config, - ), - const SizedBox(height: 1), + _SummaryItem(state: state, config: config), if (description case String description) ...[ const SizedBox(height: 1), Text( diff --git a/lib/src/form/state.dart b/lib/src/form/state.dart index f47b020..97a56e5 100644 --- a/lib/src/form/state.dart +++ b/lib/src/form/state.dart @@ -11,10 +11,6 @@ class FormState { _updateState(); } - /// Creates a [FormState] configured for a multi-screen `Form`. - factory FormState.multiScreen(List configValues) = - MultiScreenFormState; - /// Configurations used to initialize this state. final List _configValues; diff --git a/pubspec.yaml b/pubspec.yaml index ed93e89..b32bdf7 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: serverpod_tui description: A collection of tools for building terminal user interfaces. -version: 0.3.0 +version: 0.4.0 repository: https://github.com/serverpod/serverpod_tui homepage: https://serverpod.dev issue_tracker: https://github.com/serverpod/serverpod_tui/issues