Commit de3e899
authored
update to 7.3.10 (#102)
This pull request reworks the `ThemedSelectInput` component to add more
flexibility and control over selection behavior, including supporting
unselecting options, returning null on dialog close, and auto-closing
after selection. It also updates the example usage and makes several
internal improvements to support these features.
**Enhancements to ThemedSelectInput:**
- Added new properties to `ThemedSelectInput`: `canUnselect`,
`returnNullOnClose`, and `autoClose`, allowing users to unselect an
option, control the return value when the dialog is closed, and
auto-close the dialog after a selection, respectively.
[[1]](diffhunk://#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4edR3-R5)
[[2]](diffhunk://#diff-b5e1b610229280dab04b9a90f5920f58e43d46b2ccc2e7b4a3bcb91ed5bebec5L270-R426)
- Refactored the dialog logic into a new `DialogSelectInput` widget,
improving separation of concerns and maintainability.
**API and Data Model Updates:**
- Introduced a `SelectInputResult` class to standardize the result
returned from the selection dialog, including a flag for removed
(unselected) items.
- Extended `ThemedSelectItem` with an `isRemoved` property to track
unselected state when `canUnselect` is enabled.
[[1]](diffhunk://#diff-ae288802f22e9be1add99acd6aab0479a58630e7936110b28c4ef9b2ed227befR33-R36)
[[2]](diffhunk://#diff-ae288802f22e9be1add99acd6aab0479a58630e7936110b28c4ef9b2ed227befR47)
**Example and Documentation Updates:**
- Updated the example usage in `general.dart` to demonstrate the new
features and behaviors of `ThemedSelectInput`, including cases for
unselecting and returning null on close.
[[1]](diffhunk://#diff-1aeb9ec9de1c0096c75417ebfea2d5eb80c26c06c0c4dbe3566d044a49edf925R73-R76)
[[2]](diffhunk://#diff-1aeb9ec9de1c0096c75417ebfea2d5eb80c26c06c0c4dbe3566d044a49edf925L83-R113)
**Other Improvements:**
- Changed the `dialogContraints` property to be non-nullable and renamed
to `dialogConstraints` for clarity and consistency.
[[1]](diffhunk://#diff-b5e1b610229280dab04b9a90f5920f58e43d46b2ccc2e7b4a3bcb91ed5bebec5L114-R114)
[[2]](diffhunk://#diff-b5e1b610229280dab04b9a90f5920f58e43d46b2ccc2e7b4a3bcb91ed5bebec5L160-R166)
- Bumped the package version to `7.3.10` and updated the changelog with
the new features.
[[1]](diffhunk://#diff-8b7e9df87668ffa6a04b32e1769a33434999e54ae081c52e5d943c541d4c0d25L3-R3)
[[2]](diffhunk://#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4edR3-R5)6 files changed
Lines changed: 294 additions & 170 deletions
File tree
- example
- lib/views/inputs/src/selectors
- lib/src/inputs/src
- general
- utilities
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
3 | 6 | | |
4 | 7 | | |
5 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
| 74 | + | |
73 | 75 | | |
74 | | - | |
| 76 | + | |
75 | 77 | | |
76 | 78 | | |
77 | 79 | | |
| |||
80 | 82 | | |
81 | 83 | | |
82 | 84 | | |
83 | | - | |
84 | | - | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
| 88 | + | |
| 89 | + | |
88 | 90 | | |
89 | 91 | | |
90 | 92 | | |
91 | 93 | | |
| 94 | + | |
| 95 | + | |
92 | 96 | | |
93 | | - | |
| 97 | + | |
94 | 98 | | |
95 | 99 | | |
96 | 100 | | |
97 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
98 | 114 | | |
99 | 115 | | |
100 | 116 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
350 | 350 | | |
351 | 351 | | |
352 | 352 | | |
353 | | - | |
| 353 | + | |
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
| |||
0 commit comments