mirror of
https://github.com/Iconica-Development/flutter_form_wizard.git
synced 2025-05-19 10:53:49 +02:00
Compare commits
6 commits
Author | SHA1 | Date | |
---|---|---|---|
|
6d4db87ff1 | ||
|
5528664fb7 | ||
5eb914c23a | |||
9af9822fc1 | |||
|
204d0c6ca2 | ||
|
a79b0c3ad3 |
10 changed files with 339 additions and 216 deletions
14
.github/workflows/release.yml
vendored
Normal file
14
.github/workflows/release.yml
vendored
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
name: Iconica Standard Component Release Workflow
|
||||||
|
# Workflow Caller version: 1.0.0
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
call-global-iconica-workflow:
|
||||||
|
uses: Iconica-Development/.github/.github/workflows/component-release.yml@master
|
||||||
|
secrets: inherit
|
||||||
|
permissions: write-all
|
6
.gitignore
vendored
6
.gitignore
vendored
|
@ -28,4 +28,8 @@ migrate_working_dir/
|
||||||
.dart_tool/
|
.dart_tool/
|
||||||
.packages
|
.packages
|
||||||
build/
|
build/
|
||||||
.metadata
|
.metadata
|
||||||
|
|
||||||
|
# FVM Version Cache
|
||||||
|
.fvm/
|
||||||
|
.fvmrc
|
||||||
|
|
251
CHANGELOG.md
251
CHANGELOG.md
|
@ -1,144 +1,129 @@
|
||||||
## 0.0.2 - October 10th 2022
|
## 6.6.0 - September 5th 2024
|
||||||
|
- Added `onBack` callback to the `FlutterFormOptions` to detect when the back button is pressed
|
||||||
|
|
||||||
- Initial release
|
## 6.5.0 - July 1st 2024
|
||||||
|
- Added `FlutterFormMultipleChoice` for multiple choice selection
|
||||||
|
|
||||||
## 0.1.0 - October 12th 2022
|
## 6.4.0 - June 28th 2024
|
||||||
|
- Added `FlutterFormInputDropdown` for dropdown selection
|
||||||
|
- Added style property to `FlutterFormInputEmail`
|
||||||
|
|
||||||
- Added a multi line plain text input widget
|
## 6.3.2 - May 15th 2024
|
||||||
- Ability to set the scrolldirection of the pageview
|
- Loosened the dependency on intl to be more compatible with several Flutter versions
|
||||||
- Ability to set the scrollphysics of the pages' scrollview.
|
|
||||||
|
|
||||||
## 0.2.0 - October 13th 2022
|
|
||||||
|
|
||||||
- Added date input widget
|
|
||||||
|
|
||||||
## 1.0.0 - October 13th 2022
|
|
||||||
|
|
||||||
- Fix: Proper use of generics
|
|
||||||
- Inputcontrollers now have an onChange.
|
|
||||||
- Added switch input field
|
|
||||||
|
|
||||||
## 1.0.1 - October 13th 2022
|
|
||||||
|
|
||||||
- Added forgotten onChanged parameter on date input field
|
|
||||||
|
|
||||||
## 1.0.2 - October 13th 2022
|
|
||||||
|
|
||||||
- Added forgotten icon parameter on date input field and scrollpadding on text inputfield
|
|
||||||
## 2.0.0 - October 26th 2022
|
|
||||||
|
|
||||||
- Added the id of the input field on the input check widget.
|
|
||||||
- Ability to set the height of the carousel input field.
|
|
||||||
- InputController now contains the onSubmit callback.
|
|
||||||
|
|
||||||
## 2.0.1 - October 27th 2022
|
|
||||||
|
|
||||||
- onChange of switch input not firing fixed
|
|
||||||
|
|
||||||
## 4.0.2 - November 29th 2022
|
|
||||||
|
|
||||||
- Name change to flutter_form_wizard
|
|
||||||
|
|
||||||
|
|
||||||
## 4.0.3 - November 29th 2022
|
|
||||||
|
|
||||||
- Change from input to `flutter_input_library`
|
|
||||||
|
|
||||||
## 5.0.0 - November 29th 2022
|
|
||||||
|
|
||||||
- `flutter_input_library` now enforces 24h time requirements
|
|
||||||
|
|
||||||
## 5.0.4 - January 12th 2023
|
|
||||||
|
|
||||||
- Add FocusNode option to inputs
|
|
||||||
|
|
||||||
## 5.0.5 - January 12th 2023
|
|
||||||
|
|
||||||
- Expose translations
|
|
||||||
|
|
||||||
## 5.0.6 - January 12th 2023
|
|
||||||
|
|
||||||
- `flutter_input_library` datetime validator fix
|
|
||||||
|
|
||||||
## 5.0.7 - January 12th 2023
|
|
||||||
|
|
||||||
- `flutter_input_library` add styling text datetime fix
|
|
||||||
|
|
||||||
## 5.0.8 - January 18th 2023
|
|
||||||
|
|
||||||
- `flutter_input_library` add focusNode option to `FlutterFormInputMultiLine`
|
|
||||||
|
|
||||||
## 5.0.9 - January 18th 2023
|
|
||||||
|
|
||||||
- `flutter_input_library` add initial time picker parameter
|
|
||||||
|
|
||||||
## 6.0.0 - march 28th 2023
|
|
||||||
|
|
||||||
- Bump `flutter_input_library` to version 2.0.0
|
|
||||||
- Remove unnecessary `riverpod` dependency
|
|
||||||
|
|
||||||
## 6.1.0 - May 12th 2023
|
|
||||||
|
|
||||||
- Make compatible to flutter 3.10
|
|
||||||
|
|
||||||
## 6.1.1 - August 10th 2023
|
|
||||||
|
|
||||||
- Bump `flutter_input_library` to version 2.2.0
|
|
||||||
## 6.1.2 - August 11th 2023
|
|
||||||
|
|
||||||
- Bump `flutter_input_library` to version 2.2.1
|
|
||||||
|
|
||||||
## 6.1.3 - September 26th 2023
|
|
||||||
- Fix date format for datecontroller
|
|
||||||
|
|
||||||
## 6.1.4 - October 26th 2023
|
|
||||||
- Bump `flutter_input_library` to version 2.3.0
|
|
||||||
|
|
||||||
## 6.1.5 - October 26th 2023
|
|
||||||
- Bump `flutter_input_library` to version 2.4.0
|
|
||||||
|
|
||||||
## 6.1.6 - October 26th 2023
|
|
||||||
- Add enabled property to FlutterFormInputPlainText and FlutterFormInputDateTime
|
|
||||||
|
|
||||||
## 6.1.7 - November 1st 2023
|
|
||||||
- pass on the show icon property to flutter form input date time widget
|
|
||||||
|
|
||||||
## 6.1.8 - December 6th 2023
|
|
||||||
- Pass on the style property to the FlutterFormPlainText input widget
|
|
||||||
- Bump `flutter_input_library` to version 2.5.0
|
|
||||||
|
|
||||||
## 6.2.0 - December 14th 2023
|
|
||||||
- Pass on the `textCapitalization` property to FlutterFormPlainText and FlutterFormMultiLine
|
|
||||||
|
|
||||||
## 6.2.1 - January 12th 2024
|
|
||||||
- Pass on the `initialValue` property to FlutterFormMultiLine
|
|
||||||
|
|
||||||
## 6.2.2 - February 6th 2024
|
|
||||||
- Updated the `flutter_input_library` from 2.6.0 to 3.0.0
|
|
||||||
|
|
||||||
## 6.2.3 - February 7th 2024
|
|
||||||
- Added CI and linter
|
|
||||||
|
|
||||||
## 6.2.4 - February 9th 2024
|
|
||||||
- Updated the `flutter_input_library` from 3.0.0 to 3.0.1
|
|
||||||
|
|
||||||
## 6.2.5 - February 15th 2024
|
|
||||||
- Updated the `flutter_input_library` from 3.0.1 to 3.1.0
|
|
||||||
|
|
||||||
## 6.3.0 - February 21th 2024
|
|
||||||
- Updated the `flutter_input_library` from 3.1.0 to 3.2.1
|
|
||||||
- Added `FlutterFormInputPhone` for phone number with dial code selection.
|
|
||||||
- Added `InputDecoration` parameter to the following inputfields: `FlutterFormInputEmail` and `FlutterFormInputPassword`
|
|
||||||
|
|
||||||
## 6.3.1 - February 29th 2024
|
## 6.3.1 - February 29th 2024
|
||||||
- Removed `TranslationService` and add `validationMessage` property to fields with validation.
|
- Removed `TranslationService` and add `validationMessage` property to fields with validation.
|
||||||
- Added a way to override a input field validator.
|
- Added a way to override a input field validator.
|
||||||
- Exposed all properties for `FlutterFormInputDateTime` provided by `flutter_input_library`.
|
- Exposed all properties for `FlutterFormInputDateTime` provided by `flutter_input_library`.
|
||||||
|
|
||||||
## 6.3.2 - May 15th 2024
|
## 6.3.0 - February 21st 2024
|
||||||
- Loosened the dependency on intl to be more compatible with several Flutter versions
|
- Updated the `flutter_input_library` from 3.1.0 to 3.2.1
|
||||||
|
- Added `FlutterFormInputPhone` for phone number with dial code selection.
|
||||||
|
- Added `InputDecoration` parameter to the following input fields: `FlutterFormInputEmail` and `FlutterFormInputPassword`
|
||||||
|
|
||||||
|
## 6.2.5 - February 15th 2024
|
||||||
|
- Updated the `flutter_input_library` from 3.0.1 to 3.1.0
|
||||||
|
|
||||||
## 6.4.0 - June 28th 2024
|
## 6.2.4 - February 9th 2024
|
||||||
- Added `FlutterFormInputDropdown` for dropdown selection
|
- Updated the `flutter_input_library` from 3.0.0 to 3.0.1
|
||||||
- Added style property to `FlutterFormInputEmail`
|
|
||||||
|
## 6.2.3 - February 7th 2024
|
||||||
|
- Added CI and linter
|
||||||
|
|
||||||
|
## 6.2.2 - February 6th 2024
|
||||||
|
- Updated the `flutter_input_library` from 2.6.0 to 3.0.0
|
||||||
|
|
||||||
|
## 6.2.1 - January 12th 2024
|
||||||
|
- Pass on the `initialValue` property to FlutterFormMultiLine
|
||||||
|
|
||||||
|
## 6.2.0 - December 14th 2023
|
||||||
|
- Pass on the `textCapitalization` property to FlutterFormPlainText and FlutterFormMultiLine
|
||||||
|
|
||||||
|
## 6.1.8 - December 6th 2023
|
||||||
|
- Pass on the style property to the FlutterFormPlainText input widget
|
||||||
|
- Bump `flutter_input_library` to version 2.5.0
|
||||||
|
|
||||||
|
## 6.1.7 - November 1st 2023
|
||||||
|
- Pass on the show icon property to flutter form input date time widget
|
||||||
|
|
||||||
|
## 6.1.6 - October 26th 2023
|
||||||
|
- Add enabled property to FlutterFormInputPlainText and FlutterFormInputDateTime
|
||||||
|
|
||||||
|
## 6.1.5 - October 26th 2023
|
||||||
|
- Bump `flutter_input_library` to version 2.4.0
|
||||||
|
|
||||||
|
## 6.1.4 - October 26th 2023
|
||||||
|
- Bump `flutter_input_library` to version 2.3.0
|
||||||
|
|
||||||
|
## 6.1.3 - September 26th 2023
|
||||||
|
- Fix date format for date controller
|
||||||
|
|
||||||
|
## 6.1.2 - August 11th 2023
|
||||||
|
- Bump `flutter_input_library` to version 2.2.1
|
||||||
|
|
||||||
|
## 6.1.1 - August 10th 2023
|
||||||
|
- Bump `flutter_input_library` to version 2.2.0
|
||||||
|
|
||||||
|
## 6.1.0 - May 12th 2023
|
||||||
|
- Make compatible with Flutter 3.10
|
||||||
|
|
||||||
|
## 6.0.0 - March 28th 2023
|
||||||
|
- Bump `flutter_input_library` to version 2.0.0
|
||||||
|
- Remove unnecessary `riverpod` dependency
|
||||||
|
|
||||||
|
## 5.0.9 - January 18th 2023
|
||||||
|
- `flutter_input_library` add initial time picker parameter
|
||||||
|
|
||||||
|
## 5.0.8 - January 18th 2023
|
||||||
|
- `flutter_input_library` add focusNode option to `FlutterFormInputMultiLine`
|
||||||
|
|
||||||
|
## 5.0.7 - January 12th 2023
|
||||||
|
- `flutter_input_library` add styling text datetime fix
|
||||||
|
|
||||||
|
## 5.0.6 - January 12th 2023
|
||||||
|
- `flutter_input_library` datetime validator fix
|
||||||
|
|
||||||
|
## 5.0.5 - January 12th 2023
|
||||||
|
- Expose translations
|
||||||
|
|
||||||
|
## 5.0.4 - January 12th 2023
|
||||||
|
- Add FocusNode option to inputs
|
||||||
|
|
||||||
|
## 5.0.0 - November 29th 2022
|
||||||
|
- `flutter_input_library` now enforces 24h time requirements
|
||||||
|
|
||||||
|
## 4.0.3 - November 29th 2022
|
||||||
|
- Change from input to `flutter_input_library`
|
||||||
|
|
||||||
|
## 4.0.2 - November 29th 2022
|
||||||
|
- Name change to flutter_form_wizard
|
||||||
|
|
||||||
|
## 2.0.1 - October 27th 2022
|
||||||
|
- onChange of switch input not firing fixed
|
||||||
|
|
||||||
|
## 2.0.0 - October 26th 2022
|
||||||
|
- Added the id of the input field on the input check widget.
|
||||||
|
- Ability to set the height of the carousel input field.
|
||||||
|
- InputController now contains the onSubmit callback.
|
||||||
|
|
||||||
|
## 1.0.2 - October 13th 2022
|
||||||
|
- Added forgotten icon parameter on date input field and scroll padding on text input field
|
||||||
|
|
||||||
|
## 1.0.1 - October 13th 2022
|
||||||
|
- Added forgotten onChanged parameter on date input field
|
||||||
|
|
||||||
|
## 1.0.0 - October 13th 2022
|
||||||
|
- Fix: Proper use of generics
|
||||||
|
- Input controllers now have an onChange.
|
||||||
|
- Added switch input field
|
||||||
|
|
||||||
|
## 0.2.0 - October 13th 2022
|
||||||
|
- Added date input widget
|
||||||
|
|
||||||
|
## 0.1.0 - October 12th 2022
|
||||||
|
- Added a multi-line plain text input widget
|
||||||
|
- Ability to set the scroll direction of the page view
|
||||||
|
- Ability to set the scroll physics of the pages' scroll view.
|
||||||
|
|
||||||
|
## 0.0.2 - October 10th 2022
|
||||||
|
- Initial release
|
||||||
|
|
|
@ -1,45 +0,0 @@
|
||||||
# This file tracks properties of this Flutter project.
|
|
||||||
# Used by Flutter tool to assess capabilities and perform upgrades etc.
|
|
||||||
#
|
|
||||||
# This file should be version controlled.
|
|
||||||
|
|
||||||
version:
|
|
||||||
revision: 4f9d92fbbdf072a70a70d2179a9f87392b94104c
|
|
||||||
channel: stable
|
|
||||||
|
|
||||||
project_type: app
|
|
||||||
|
|
||||||
# Tracks metadata for the flutter migrate command
|
|
||||||
migration:
|
|
||||||
platforms:
|
|
||||||
- platform: root
|
|
||||||
create_revision: 4f9d92fbbdf072a70a70d2179a9f87392b94104c
|
|
||||||
base_revision: 4f9d92fbbdf072a70a70d2179a9f87392b94104c
|
|
||||||
- platform: android
|
|
||||||
create_revision: 4f9d92fbbdf072a70a70d2179a9f87392b94104c
|
|
||||||
base_revision: 4f9d92fbbdf072a70a70d2179a9f87392b94104c
|
|
||||||
- platform: ios
|
|
||||||
create_revision: 4f9d92fbbdf072a70a70d2179a9f87392b94104c
|
|
||||||
base_revision: 4f9d92fbbdf072a70a70d2179a9f87392b94104c
|
|
||||||
- platform: linux
|
|
||||||
create_revision: 4f9d92fbbdf072a70a70d2179a9f87392b94104c
|
|
||||||
base_revision: 4f9d92fbbdf072a70a70d2179a9f87392b94104c
|
|
||||||
- platform: macos
|
|
||||||
create_revision: 4f9d92fbbdf072a70a70d2179a9f87392b94104c
|
|
||||||
base_revision: 4f9d92fbbdf072a70a70d2179a9f87392b94104c
|
|
||||||
- platform: web
|
|
||||||
create_revision: 4f9d92fbbdf072a70a70d2179a9f87392b94104c
|
|
||||||
base_revision: 4f9d92fbbdf072a70a70d2179a9f87392b94104c
|
|
||||||
- platform: windows
|
|
||||||
create_revision: 4f9d92fbbdf072a70a70d2179a9f87392b94104c
|
|
||||||
base_revision: 4f9d92fbbdf072a70a70d2179a9f87392b94104c
|
|
||||||
|
|
||||||
# User provided section
|
|
||||||
|
|
||||||
# List of Local paths (relative to this file) that should be
|
|
||||||
# ignored by the migrate tool.
|
|
||||||
#
|
|
||||||
# Files that are not part of the templates will be ignored by default.
|
|
||||||
unmanaged_files:
|
|
||||||
- 'lib/main.dart'
|
|
||||||
- 'ios/Runner.xcodeproj/project.pbxproj'
|
|
|
@ -45,10 +45,10 @@ packages:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: cupertino_icons
|
name: cupertino_icons
|
||||||
sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be
|
sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.5"
|
version: "1.0.8"
|
||||||
fake_async:
|
fake_async:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -68,24 +68,24 @@ packages:
|
||||||
path: ".."
|
path: ".."
|
||||||
relative: true
|
relative: true
|
||||||
source: path
|
source: path
|
||||||
version: "6.3.1"
|
version: "6.5.0"
|
||||||
flutter_input_library:
|
flutter_input_library:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
path: "."
|
path: "."
|
||||||
ref: "3.3.1"
|
ref: "3.4.0"
|
||||||
resolved-ref: fbc64dcc232e298216a6fa64114b621314b5712a
|
resolved-ref: cdc06bbb7933ba7ac2835e29d2c8fabf69e5f5a6
|
||||||
url: "https://github.com/Iconica-Development/flutter_input_library"
|
url: "https://github.com/Iconica-Development/flutter_input_library"
|
||||||
source: git
|
source: git
|
||||||
version: "3.3.1"
|
version: "3.4.0"
|
||||||
flutter_lints:
|
flutter_lints:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
name: flutter_lints
|
name: flutter_lints
|
||||||
sha256: aeb0b80a8b3709709c9cc496cdc027c5b3216796bc0af0ce1007eaf24464fd4c
|
sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.1"
|
version: "2.0.3"
|
||||||
flutter_localizations:
|
flutter_localizations:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description: flutter
|
description: flutter
|
||||||
|
@ -95,10 +95,10 @@ packages:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: flutter_riverpod
|
name: flutter_riverpod
|
||||||
sha256: "371f6e8acb69dbe8aa3e0a50c8a65f8a9352b599134d585cc4923261cb5ae4d6"
|
sha256: "0f1974eff5bbe774bf1d870e406fc6f29e3d6f1c46bd9c58e7172ff68a785d7d"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.1"
|
version: "2.5.1"
|
||||||
flutter_test:
|
flutter_test:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description: flutter
|
description: flutter
|
||||||
|
@ -116,18 +116,18 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: leak_tracker
|
name: leak_tracker
|
||||||
sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a"
|
sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "10.0.4"
|
version: "10.0.5"
|
||||||
leak_tracker_flutter_testing:
|
leak_tracker_flutter_testing:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: leak_tracker_flutter_testing
|
name: leak_tracker_flutter_testing
|
||||||
sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8"
|
sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.0.3"
|
version: "3.0.5"
|
||||||
leak_tracker_testing:
|
leak_tracker_testing:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -140,10 +140,10 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: lints
|
name: lints
|
||||||
sha256: "5cfd6509652ff5e7fe149b6df4859e687fca9048437857cb2e65c8d780f396e3"
|
sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.0"
|
version: "2.1.1"
|
||||||
matcher:
|
matcher:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -156,18 +156,18 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: material_color_utilities
|
name: material_color_utilities
|
||||||
sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
|
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.8.0"
|
version: "0.11.1"
|
||||||
meta:
|
meta:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: meta
|
name: meta
|
||||||
sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136"
|
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.12.0"
|
version: "1.15.0"
|
||||||
path:
|
path:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -180,10 +180,10 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: riverpod
|
name: riverpod
|
||||||
sha256: "899cd0999b2f3b798349d9b5639cfea81d406c011bd914097145ff92e91b29f9"
|
sha256: f21b32ffd26a36555e501b04f4a5dca43ed59e16343f1a30c13632b2351dfa4d
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.1"
|
version: "2.5.1"
|
||||||
sky_engine:
|
sky_engine:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description: flutter
|
description: flutter
|
||||||
|
@ -209,10 +209,10 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: state_notifier
|
name: state_notifier
|
||||||
sha256: "8fe42610f179b843b12371e40db58c9444f8757f8b69d181c97e50787caed289"
|
sha256: b8677376aa54f2d7c58280d5a007f9e8774f1968d1fb1c096adcb4792fba29bb
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.7.2+1"
|
version: "1.0.0"
|
||||||
stream_channel:
|
stream_channel:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -241,10 +241,10 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: test_api
|
name: test_api
|
||||||
sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f"
|
sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.7.0"
|
version: "0.7.2"
|
||||||
vector_math:
|
vector_math:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -257,10 +257,10 @@ packages:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: vm_service
|
name: vm_service
|
||||||
sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec"
|
sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "14.2.1"
|
version: "14.2.5"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=3.3.0 <4.0.0"
|
dart: ">=3.3.0 <4.0.0"
|
||||||
flutter: ">=3.18.0-18.0.pre.54"
|
flutter: ">=3.18.0-18.0.pre.54"
|
||||||
|
|
|
@ -487,7 +487,7 @@ class FlutterFormController extends ChangeNotifier {
|
||||||
|
|
||||||
Future<void> previousStep() async {
|
Future<void> previousStep() async {
|
||||||
_currentStep -= 1;
|
_currentStep -= 1;
|
||||||
|
_options.onBack?.call(_currentStep);
|
||||||
_checkingPages = false;
|
_checkingPages = false;
|
||||||
|
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
|
|
|
@ -15,3 +15,4 @@ export 'input_phone.dart';
|
||||||
export 'input_plain_text.dart';
|
export 'input_plain_text.dart';
|
||||||
export 'input_slider/input_slider.dart';
|
export 'input_slider/input_slider.dart';
|
||||||
export 'input_switch/input_switch.dart';
|
export 'input_switch/input_switch.dart';
|
||||||
|
export 'multiple_choice.dart';
|
||||||
|
|
159
lib/src/widgets/input/input_types/multiple_choice.dart
Normal file
159
lib/src/widgets/input/input_types/multiple_choice.dart
Normal file
|
@ -0,0 +1,159 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_form_wizard/flutter_form.dart';
|
||||||
|
|
||||||
|
class FlutterFormInputMultipleChoice extends FlutterFormInputWidget<String> {
|
||||||
|
/// Creates a [FlutterFormInputMultipleChoice].
|
||||||
|
///
|
||||||
|
/// The [controller], [options], [builder], [validationMessage] parameters
|
||||||
|
/// are required.
|
||||||
|
/// The [key], [focusNode], [label] are optional.
|
||||||
|
const FlutterFormInputMultipleChoice({
|
||||||
|
required super.controller,
|
||||||
|
required this.options,
|
||||||
|
required this.builder,
|
||||||
|
required this.validationMessage,
|
||||||
|
super.focusNode,
|
||||||
|
super.label,
|
||||||
|
super.key,
|
||||||
|
this.mainAxisExtent,
|
||||||
|
this.childAspectRatio = 1,
|
||||||
|
this.mainAxisSpacing = 0,
|
||||||
|
this.crossAxisSpacing = 0,
|
||||||
|
this.crossAxisCount = 3,
|
||||||
|
this.height,
|
||||||
|
this.shrinkwrap = true,
|
||||||
|
this.validator,
|
||||||
|
});
|
||||||
|
|
||||||
|
final List<String> options;
|
||||||
|
final double? mainAxisExtent;
|
||||||
|
final double childAspectRatio;
|
||||||
|
final double mainAxisSpacing;
|
||||||
|
final double crossAxisSpacing;
|
||||||
|
final int crossAxisCount;
|
||||||
|
final double? height;
|
||||||
|
final bool shrinkwrap;
|
||||||
|
final Widget Function(
|
||||||
|
BuildContext context,
|
||||||
|
int index,
|
||||||
|
ValueNotifier<int?> selectedIndex,
|
||||||
|
FlutterFormInputController controller,
|
||||||
|
List<String> options,
|
||||||
|
FormFieldState<String> state,
|
||||||
|
) builder;
|
||||||
|
final String? Function(String? value, String validationMessage)? validator;
|
||||||
|
final String validationMessage;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
super.registerController(context);
|
||||||
|
var selectedIndex = ValueNotifier<int?>(null);
|
||||||
|
|
||||||
|
return FormField<String>(
|
||||||
|
onSaved: controller.onSaved,
|
||||||
|
validator: (value) =>
|
||||||
|
validator?.call(value, validationMessage) ??
|
||||||
|
controller.onValidate(value, validationMessage),
|
||||||
|
builder: (state) => SizedBox(
|
||||||
|
height: height,
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
GridView.builder(
|
||||||
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
|
itemCount: options.length,
|
||||||
|
shrinkWrap: shrinkwrap,
|
||||||
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
|
mainAxisExtent: mainAxisExtent,
|
||||||
|
childAspectRatio: childAspectRatio,
|
||||||
|
mainAxisSpacing: mainAxisSpacing,
|
||||||
|
crossAxisSpacing: crossAxisSpacing,
|
||||||
|
crossAxisCount: crossAxisCount,
|
||||||
|
),
|
||||||
|
itemBuilder: (context, index) => ListenableBuilder(
|
||||||
|
listenable: selectedIndex,
|
||||||
|
builder: (context, widget) => builder.call(
|
||||||
|
context,
|
||||||
|
index,
|
||||||
|
selectedIndex,
|
||||||
|
controller,
|
||||||
|
options,
|
||||||
|
state,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
if (state.hasError)
|
||||||
|
Text(
|
||||||
|
state.errorText!,
|
||||||
|
style: const TextStyle(
|
||||||
|
color: Color(0xFFAD3645),
|
||||||
|
fontSize: 14.0,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
else
|
||||||
|
const SizedBox.shrink(),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class FlutterFormInputMultipleChoiceController
|
||||||
|
implements FlutterFormInputController<String> {
|
||||||
|
/// Creates a [FlutterFormInputMultipleChoiceController].
|
||||||
|
///
|
||||||
|
/// The [id] parameter specifies the unique identifier for the controller.
|
||||||
|
/// The [mandatory] parameter specifies whether the input is mandatory.
|
||||||
|
/// The [value], [checkPageTitle], [checkPageDescription], [onChanged],
|
||||||
|
/// and [onSubmit] parameters are optional.
|
||||||
|
FlutterFormInputMultipleChoiceController({
|
||||||
|
required this.id,
|
||||||
|
this.mandatory = false,
|
||||||
|
this.value,
|
||||||
|
this.checkPageTitle,
|
||||||
|
this.checkPageDescription,
|
||||||
|
this.onChanged,
|
||||||
|
this.onSubmit,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
String? id;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String? value;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool mandatory;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String Function(String? value)? checkPageTitle;
|
||||||
|
|
||||||
|
@override
|
||||||
|
String Function(String? value)? checkPageDescription;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void Function(String? value)? onChanged;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void Function(String? value)? onSubmit;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onSaved(String? value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
String? onValidate(
|
||||||
|
String? value,
|
||||||
|
String validationMessage,
|
||||||
|
) {
|
||||||
|
if (mandatory) {
|
||||||
|
if (value == null || value.isEmpty) {
|
||||||
|
return validationMessage;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
|
@ -22,6 +22,7 @@ import 'package:flutter/material.dart';
|
||||||
///
|
///
|
||||||
/// [onFinished] and [onNext] are both callbacks which give the users results.
|
/// [onFinished] and [onNext] are both callbacks which give the users results.
|
||||||
/// [onNext] is called when the user goes to the next page.
|
/// [onNext] is called when the user goes to the next page.
|
||||||
|
/// [onBack] is called when the user goes back a page.
|
||||||
/// [onFinished] is called when the form is finished. When checkpage is set
|
/// [onFinished] is called when the form is finished. When checkpage is set
|
||||||
/// [onFinished] is called when the checkpage is finished.
|
/// [onFinished] is called when the checkpage is finished.
|
||||||
///
|
///
|
||||||
|
@ -35,6 +36,7 @@ class FlutterFormOptions {
|
||||||
required this.pages,
|
required this.pages,
|
||||||
required this.onFinished,
|
required this.onFinished,
|
||||||
required this.onNext,
|
required this.onNext,
|
||||||
|
this.onBack,
|
||||||
this.checkPage,
|
this.checkPage,
|
||||||
this.nextButton,
|
this.nextButton,
|
||||||
this.backButton,
|
this.backButton,
|
||||||
|
@ -49,6 +51,11 @@ class FlutterFormOptions {
|
||||||
backButton;
|
backButton;
|
||||||
final void Function(Map<int, Map<String, dynamic>>) onFinished;
|
final void Function(Map<int, Map<String, dynamic>>) onFinished;
|
||||||
final void Function(int pageNumber, Map<String, dynamic>) onNext;
|
final void Function(int pageNumber, Map<String, dynamic>) onNext;
|
||||||
|
|
||||||
|
/// [onBack] is called when the user goes back a page. The [pageNumber] is the
|
||||||
|
/// page the user is going back to. Not the page that the user was on when the
|
||||||
|
/// user pressed the back button.
|
||||||
|
final void Function(int pageNumber)? onBack;
|
||||||
final Axis scrollDirection;
|
final Axis scrollDirection;
|
||||||
final ScrollPhysics? scrollPhysics;
|
final ScrollPhysics? scrollPhysics;
|
||||||
}
|
}
|
||||||
|
|
14
pubspec.yaml
14
pubspec.yaml
|
@ -1,12 +1,12 @@
|
||||||
name: flutter_form_wizard
|
name: flutter_form_wizard
|
||||||
description: A new Flutter package project.
|
description: A new Flutter package project.
|
||||||
version: 6.4.0
|
version: 6.6.0
|
||||||
homepage: https://github.com/Iconica-Development/flutter_form_wizard
|
homepage: https://github.com/Iconica-Development/flutter_form_wizard
|
||||||
|
|
||||||
publish_to: none
|
publish_to: https://forgejo.internal.iconica.nl/api/packages/internal/pub
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.18.0 <3.0.0"
|
sdk: ">=3.0.0 <4.0.0"
|
||||||
flutter: ">=1.17.0"
|
flutter: ">=1.17.0"
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
|
@ -16,9 +16,8 @@ dependencies:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
intl: ">=0.18.0 <1.0.0"
|
intl: ">=0.18.0 <1.0.0"
|
||||||
flutter_input_library:
|
flutter_input_library:
|
||||||
git:
|
hosted: https://forgejo.internal.iconica.nl/api/packages/internal/pub
|
||||||
url: https://github.com/Iconica-Development/flutter_input_library
|
version: ^3.4.0
|
||||||
ref: 3.4.0
|
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
@ -27,5 +26,4 @@ dev_dependencies:
|
||||||
git:
|
git:
|
||||||
url: https://github.com/Iconica-Development/flutter_iconica_analysis
|
url: https://github.com/Iconica-Development/flutter_iconica_analysis
|
||||||
ref: 6.0.0
|
ref: 6.0.0
|
||||||
|
|
||||||
flutter:
|
|
Loading…
Reference in a new issue