Skip to content

Commit

Permalink
2.1.2 * Initial effort to support FormField parameters. Thanks @marti…
Browse files Browse the repository at this point in the history
…n-labanic #68 * Recording Flutster automated integration testing as a playable video.
  • Loading branch information
lcuis committed Sep 29, 2022
1 parent a549341 commit 9c7329b
Show file tree
Hide file tree
Showing 6 changed files with 140 additions and 50 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,16 @@ jobs:
runs-on: self-hosted
steps:
- uses: actions/checkout@v1
- run: cd example&&flutter test integration_test/example_test.dart --dart-define="flutsterKey=${{ secrets.FLUTSTERAPIKEY }}" --dart-define="flutsterUser=${{ secrets.FLUTSTERAPIUSER }}" --dart-define="flutsterUrl=${{ secrets.FLUTSTERAPIURL }}"
- run: cd example&&scrcpy --record-format=mkv -r integration_test.mkv&&flutter test integration_test/example_test.dart --dart-define="flutsterKey=${{ secrets.FLUTSTERAPIKEY }}" --dart-define="flutsterUser=${{ secrets.FLUTSTERAPIUSER }}" --dart-define="flutsterUrl=${{ secrets.FLUTSTERAPIURL }}";killall scrcpy
- name: Deploy Flutster integration testing video
uses: garygrossgarten/github-action-scp@release
with:
local: example/integration_test.mkv
remote: fromgithub/
host: ${{ secrets.jodhost }}
username: ${{ secrets.jodsshuser }}
password: ${{ secrets.jodsshpassword }}
recursive: true

# - name: Publish
# uses: sakebook/[email protected]
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
## 2.1.2

* Sort and filter buttons don't appear when searchHint is not provided. Thanks @rob-mur https://github.com/lcuis/search_choices/issues/88
* Initial effort to support FormField parameters. Thanks @martin-labanic https://github.com/lcuis/search_choices/issues/68
* Recording Flutster automated integration testing as a playable video.

## 2.1.1

Expand Down
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,9 @@ Search choices Widget with a single choice that opens a dialog or a menu to let
String searchTerms,
)?
showDialogFn,
FormFieldSetter<T>? onSaved,
AutovalidateMode autovalidateMode = AutovalidateMode.onUserInteraction,
String? restorationId,
})
```

Expand Down Expand Up @@ -216,6 +219,9 @@ Search choices Widget with a single choice that opens a dialog or a menu to let
* fieldDecoration Decoration is the decoration of the SearchChoices Widget while displaying the hints or the selected values. Should differ when selection is not valid.
* clearSearchIcon Widget sets the icon to be used to clear the search.
* showDialogFn Function allows the control of the dialog display.
* onSaved as in FormField.
* autovalidateMode as in FormField.
* restorationId as in FormField.


#### Multiple choice constructor
Expand Down Expand Up @@ -299,6 +305,10 @@ Search choices Widget with a multiple choice that opens a dialog or a menu to le
String searchTerms,
)?
showDialogFn,
FormFieldSetter<T>? onSaved,
String? Function(List<dynamic>)? listValidator,
AutovalidateMode autovalidateMode = AutovalidateMode.onUserInteraction,
String? restorationId,
})
```

Expand Down Expand Up @@ -354,6 +364,10 @@ Search choices Widget with a multiple choice that opens a dialog or a menu to le
* fieldDecoration Decoration is the decoration of the SearchChoices Widget while displaying the hints or the selected values. Should differ when selection is not valid.
* clearSearchIcon Widget sets the icon to be used to clear the search.
* showDialogFn Function allows the control of the dialog display.
* onSaved as in FormField.
* listValidator Function with parameter: List returning String displayed below selected value when not valid and null when valid.
* autovalidateMode as in FormField.
* restorationId as in FormField.

#### Example app usage

Expand Down Expand Up @@ -2706,4 +2720,6 @@ In your pull request, feel free to add your line in the contributors section bel

## CI/CD

Continuous integration/deployment status: ![CI-CD](https://github.com/lcuis/search_choices/workflows/CI-CD/badge.svg)
Continuous integration/deployment status: ![CI-CD](https://github.com/lcuis/search_choices/workflows/CI-CD/badge.svg)

Automated integration testing was done using [Flutster](https://flutster.com). Here is the latest recorded video of this automated integration testing: [http://searchchoices.jod.li/integration_test.mkv](http://searchchoices.jod.li/integration_test.mkv)
4 changes: 2 additions & 2 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ class MyAppState extends State<MyApp> {
selectedItems: selectedItemsMultiSelect3Dialog,
hint: "Select 3 items",
searchHint: "Select 3",
validator: (selectedItemsForValidator) {
listValidator: (selectedItemsForValidator) {
if (selectedItemsForValidator.length != 3) {
return ("Must select 3");
}
Expand Down Expand Up @@ -1082,7 +1082,7 @@ class MyAppState extends State<MyApp> {
selectedItems: selectedItemsMultiSelect3Menu,
hint: "Select 3 items",
searchHint: "Select 3",
validator: (selectedItemsForValidatorWithMenu) {
listValidator: (selectedItemsForValidatorWithMenu) {
if (selectedItemsForValidatorWithMenu.length != 3) {
return ("Must select 3");
}
Expand Down
Loading

0 comments on commit 9c7329b

Please sign in to comment.