Skip to content

Commit e7b35f5

Browse files
committed
Update readme, changelog, and apk example
1 parent cff6dcf commit e7b35f5

File tree

3 files changed

+64
-43
lines changed

3 files changed

+64
-43
lines changed

CHANGELOG.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
1-
## [4.0.0]
1+
## [4.0.0] - 2020-09-23
22

33
* Validate before confirm
44
* Auto search on type
55
* Accent marks handler on search
66
* Highlight search result
7-
* Add Chips tile widget
7+
* New Chips tile widget
88
* Horizotal or vertical choice list scroll direction
99
* Use `StatefulWidget` instead of `Provider` as state management
1010
* Configuration supports `copyWith` and `merge`
1111
* Easy shortcut to define configuration
1212
* Simplify class name and enum
1313
* Removed `sticky_headers` package, provide simple API to easy implement sticky header
14-
* Add choice text and group header text highlight on filter
14+
* Choice text and group header text highlight on filter
1515
* Customizable choice layout and scroll direction
1616
* Customizable every part on modal widget (header, footer, searchbar, confirm button, searchbar toggle)
17+
* Choice select all/none, and provide an easy way to programmatic select
18+
* New Modal barrier color and dissmisible configuration
19+
* And many more useful configuration, please see the API documentation
20+
1721

1822
## [3.0.3] - 2020-01-22
1923

README.md

Lines changed: 57 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
![Pub Version](https://img.shields.io/pub/v/smart_select) ![GitHub](https://img.shields.io/github/license/davigmacode/flutter_smart_select)
44

5-
<a href="https://www.buymeacoffee.com/davigmacode" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 45px !important;" ></a>
5+
<a href="https://www.buymeacoffee.com/davigmacode" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" width="195" height="55"></a>
66

77
SmartSelect allows you to easily convert your usual form select or dropdown into dynamic page, popup dialog, or sliding bottom sheet with various choices input such as radio, checkbox, switch, chips, or even custom input. Supports single and multiple choice. Inspired by Smart Select component from [Framework7](https://framework7.io/).
88

@@ -28,10 +28,12 @@ SmartSelect allows you to easily convert your usual form select or dropdown into
2828
- Internally handle async choice items loader
2929
- Custom search handler
3030
- Choice items pagination (pull to refresh and pull to load more)
31-
- Supports iOS
31+
- Add more test
3232

3333
## Migration from 3.0.x to 4.x.x
3434

35+
- The parameter `options` is removed, instead use `choiceItems`
36+
3537
- Simplify class name and enum
3638

3739
- `SmartSelectTile` to `S2Tile`
@@ -46,23 +48,23 @@ SmartSelect allows you to easily convert your usual form select or dropdown into
4648

4749
- The parameter `builder` now is a collection of builder (`S2SingleBuilder` or `S2MultiBuilder`), instead use `tileBuilder` to create trigger tile widget.
4850

49-
- The parameters `dense`, `enabled`, `isLoading`, `isTwoLine`, `leading`, `loadingText`, `padding`, `selected`, `trailing` is removed from `SmartSelect` class, instead use `tileBuilder` and return `S2Tile` widget, it has all these parameters.
51+
- The parameters `dense`, `enabled`, `isLoading`, `isTwoLine`, `leading`, `loadingText`, `padding`, `selected`, `trailing` is removed from `SmartSelect` class, instead use `builder.tile` or `tileBuilder` and return `S2Tile` widget, it's has all these parameters.
5052

5153
- The parameter `onChange` nows return `S2SingleState state` or `S2MultiState state` instead of `T value` or `List<T> value`
5254

5355
- The parameter `choiceConfig.useWrap` is removed, instead use `choiceConfig.layout = S2ChoiceLayout.wrap`
5456

55-
- The parameter `choiceConfig.builder` moved to `builder.choiceBuilder`
57+
- The parameter `choiceConfig.builder` moved to `builder.choice` or `choiceBuilder`
5658

57-
- The parameter `choiceConfig.titleBuilder` moved to `builder.choiceTitleBuilder`
59+
- The parameter `choiceConfig.titleBuilder` moved to `builder.choiceTitle` or `choiceTitleBuilder`
5860

59-
- The parameter `choiceConfig.subtitleBuilder` moved to `builder.choiceSubtitleBuilder`
61+
- The parameter `choiceConfig.subtitleBuilder` moved to `builder.choiceSubtitle` or `choiceSubtitleBuilder`
6062

61-
- The parameter `choiceConfig.secondaryBuilder` moved to `builder.choiceSecondaryBuilder`
63+
- The parameter `choiceConfig.secondaryBuilder` moved to `builder.choiceSecondary` or `choiceSecondaryBuilder`
6264

63-
- The parameter `choiceConfig.dividerBuilder` moved to `builder.choiceDividerBuilder`
65+
- The parameter `choiceConfig.dividerBuilder` moved to `builder.choiceDivider` or `choiceDividerBuilder`
6466

65-
- The parameter `choiceConfig.emptyBuilder` moved to `builder.choiceEmptybuilder`
67+
- The parameter `choiceConfig.emptyBuilder` moved to `builder.choiceEmpty` or `choiceEmptybuilder`
6668

6769
- The parameter `choiceConfig.glowingOverscrollIndicatorColor` is removed, instead use `choiceConfig.overscrollColor`
6870

@@ -325,8 +327,8 @@ SmartSelect<T>.[single|multiple]({
325327
326328
// Whether the option list need to confirm
327329
// to return the changed value
328-
// shortcut to [modalConfig.useConfirmation]
329-
bool modalConfirmation,
330+
// shortcut to [modalConfig.useConfirm]
331+
bool modalConfirm,
330332
331333
// Whether the options list modal use header or not
332334
// shortcut to [modalConfig.useHeader]
@@ -643,31 +645,31 @@ SmartSelect<T>.single({
643645
S2SingleBuilder<T> builder,
644646
645647
// Builder for custom tile widget
646-
// shortcut to [builder.tileBuilder]
648+
// shortcut to [builder.tile]
647649
S2WidgetBuilder<S2SingleState<T>> tileBuilder,
648650
649651
// Builder for custom modal widget
650-
// shortcut to [builder.modalBuilder]
652+
// shortcut to [builder.modal]
651653
S2WidgetBuilder<S2SingleState<T>> modalBuilder,
652654
653655
// Builder for custom modal header widget
654-
// shortcut to [builder.modalHeaderBuilder]
656+
// shortcut to [builder.modalHeader]
655657
S2WidgetBuilder<S2SingleState<T>> modalHeaderBuilder,
656658
657659
// Builder for custom modal actions widget
658-
// shortcut to [builder.modalActionsBuilder]
660+
// shortcut to [builder.modalActions]
659661
S2ListWidgetBuilder<S2SingleState<T>> modalActionsBuilder,
660662
661663
// Builder for custom modal confirm action widget
662-
// shortcut to [builder.modalConfirmBuilder]
664+
// shortcut to [builder.modalConfirm]
663665
S2WidgetBuilder<S2SingleState<T>> modalConfirmBuilder,
664666
665667
// Builder for divider widget between header, body, and footer modal
666-
// shortcut to [builder.modalDividerBuilder]
668+
// shortcut to [builder.modalDivider]
667669
S2WidgetBuilder<S2SingleState<T>> modalDividerBuilder,
668670
669671
// Builder for custom footer widget
670-
// shortcut to [builder.modalFooterBuilder]
672+
// shortcut to [builder.modalFooter]
671673
S2WidgetBuilder<S2SingleState<T>> modalFooterBuilder,
672674
673675
// other configuration
@@ -692,31 +694,31 @@ SmartSelect<T>.multiple({
692694
S2MultiBuilder<T> builder,
693695
694696
// Builder for custom tile widget
695-
// shortcut to [builder.tileBuilder]
697+
// shortcut to [builder.tile]
696698
S2WidgetBuilder<S2MultiState<T>> tileBuilder,
697699
698700
// Builder for custom modal widget
699-
// shortcut to [builder.modalBuilder]
701+
// shortcut to [builder.modal]
700702
S2WidgetBuilder<S2MultiState<T>> modalBuilder,
701703
702704
// Builder for custom modal header widget
703-
// shortcut to [builder.modalHeaderBuilder]
705+
// shortcut to [builder.modalHeader]
704706
S2WidgetBuilder<S2MultiState<T>> modalHeaderBuilder,
705707
706708
// Builder for custom modal actions widget
707-
// shortcut to [builder.modalActionsBuilder]
709+
// shortcut to [builder.modalActions]
708710
S2ListWidgetBuilder<S2MultiState<T>> modalActionsBuilder,
709711
710712
// Builder for custom modal confirm action widget
711-
// shortcut to [builder.modalConfirmBuilder]
713+
// shortcut to [builder.modalConfirm]
712714
S2WidgetBuilder<S2MultiState<T>> modalConfirmBuilder,
713715
714716
// Builder for divider widget between header, body, and footer modal
715-
// shortcut to [builder.modalDividerBuilder]
717+
// shortcut to [builder.modalDivider]
716718
S2WidgetBuilder<S2MultiState<T>> modalDividerBuilder,
717719
718720
// Builder for custom footer widget
719-
// shortcut to [builder.modalFooterBuilder]
721+
// shortcut to [builder.modalFooter]
720722
S2WidgetBuilder<S2MultiState<T>> modalFooterBuilder,
721723
722724
// other configuration
@@ -737,43 +739,43 @@ SmartSelect<T>.[single|multiple]({
737739
...,
738740
739741
// Builder for modal filter widget
740-
// shortcut to [builder.modalFilterBuilder]
742+
// shortcut to [builder.modalFilter]
741743
S2WidgetBuilder<S2Filter> modalFilterBuilder,
742744
743745
// Builder for modal filter toggle widget
744-
// shortcut to [builder.modalFilterToggleBuilder]
746+
// shortcut to [builder.modalFilterToggle]
745747
S2WidgetBuilder<S2Filter> modalFilterToggleBuilder,
746748
747749
// Builder for each custom choices item widget
748-
// shortcut to [builder.choiceBuilder]
750+
// shortcut to [builder.choice]
749751
S2ChoiceBuilder<T> choiceBuilder,
750752
751753
// Builder for each custom choices item title widget
752-
// shortcut to [builder.choiceTitleBuilder]
754+
// shortcut to [builder.choiceTitle]
753755
S2ChoiceBuilder<T> choiceTitleBuilder,
754756
755757
// Builder for each custom choices item subtitle widget
756-
// shortcut to [builder.choiceSubtitleBuilder]
758+
// shortcut to [builder.choiceSubtitle]
757759
S2ChoiceBuilder<T> choiceSubtitleBuilder,
758760
759761
// Builder for each custom choices item secondary widget
760-
// shortcut to [builder.choiceSecondaryBuilder]
762+
// shortcut to [builder.choiceSecondary]
761763
S2ChoiceBuilder<T> choiceSecondaryBuilder,
762764
763765
/// Builder for custom divider widget between choices item
764-
// shortcut to [builder.choiceDividerBuilder]
766+
// shortcut to [builder.choiceDivider]
765767
IndexedWidgetBuilder choiceDividerBuilder,
766768
767769
// Builder for custom empty display
768-
// shortcut to [builder.choiceEmptyBuilder]
770+
// shortcut to [builder.choiceEmpty]
769771
S2WidgetBuilder<String> choiceEmptyBuilder,
770772
771773
// A widget builder for custom choices group
772-
// shortcut to [builder.choiceGroupBuilder]
774+
// shortcut to [builder.choiceGroup]
773775
S2ChoiceGroupBuilder choiceGroupBuilder,
774776
775777
// A widget builder for custom header choices group
776-
// shortcut to [builder.choiceHeaderBuilder]
778+
// shortcut to [builder.choiceHeader]
777779
S2ChoiceHeaderBuilder choiceHeaderBuilder,
778780
779781
// other configuration
@@ -866,13 +868,15 @@ SmartSelect<T>.multiple(
866868
### Chips Tile
867869

868870
```dart
869-
/// Chips tile/trigger widget
871+
// Chips tile/trigger widget
870872
S2ChipsTile<T>({
871873
872874
// List of value of the selected choices.
873875
List<S2Choice<T>> values,
874876
875877
// Called when the user taps this list tile.
878+
//
879+
// Inoperative if [enabled] is false.
876880
GestureTapCallback onTap,
877881
878882
// The primary content of the list tile.
@@ -882,6 +886,8 @@ S2ChipsTile<T>({
882886
Widget subtitle,
883887
884888
// A widget to display before the title.
889+
//
890+
// Typically an [Icon] or a [CircleAvatar] widget.
885891
Widget leading,
886892
887893
// A widget to display after the title.
@@ -894,7 +900,7 @@ S2ChipsTile<T>({
894900
Widget placeholder,
895901
896902
// Hide placeholder when the [values] is null
897-
bool placeholderIgnored,
903+
bool placeholderIgnore,
898904
899905
// Whether the chip list is scrollable or not
900906
bool scrollable,
@@ -911,18 +917,30 @@ S2ChipsTile<T>({
911917
// Chip brightness
912918
Brightness chipBrightness,
913919
914-
// Chip action button color
915-
Color chipActionColor,
920+
// Chip delete button color
921+
Color chipDeleteColor,
922+
923+
// Chip delete button icon
924+
Icon chipDeleteIcon,
916925
917926
// Chip spacing
918927
double chipSpacing,
919928
920929
// Chip run spacing
921930
double chipRunSpacing,
922931
932+
// Chip shape border
933+
ShapeBorder chipShape,
934+
923935
// Widget builder for chip item
924936
IndexedWidgetBuilder chipBuilder,
925937
938+
// Widget builder for chip label item
939+
IndexedWidgetBuilder chipLabelBuilder,
940+
941+
// Widget builder for chip avatar item
942+
IndexedWidgetBuilder chipAvatarBuilder,
943+
926944
// Called when the user delete the chip item.
927945
ValueChanged<T> chipOnDelete,
928946
})
@@ -968,7 +986,6 @@ SmartSelect<String>.multiple(
968986
backgroundImage: NetworkImage('https://source.unsplash.com/8I-ht65iRww/100x100'),
969987
),
970988
trailing: const Icon(Icons.add_circle_outline),
971-
scrollable: true,
972989
divider: const Divider(height: 1),
973990
chipColor: Colors.red,
974991
chipBrightness: Brightness.dark,

example/art/demo/SmartSelect.apk

23.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)