diff --git a/README.md b/README.md index 59f4b04..a46f358 100644 --- a/README.md +++ b/README.md @@ -270,6 +270,9 @@ MultiSelectBottomSheetField has all the parameters of MultiSelectBottomSheet plu | `autovalidateMode` | AutovalidateMode | If enabled, form fields will validate and update their error text immediately after every change. Default is disabled. | | `chipColor` | Color | Set the chip color. | | `chipShape` | ShapeBorde | Define a ShapeBorder for the chips. | +| `chipShadowColor` | Color | Define the shadow color for the chips. | +| `chipElevation` | double | Define the elevation for the chips. | +| `chipPressElevation` | double | Define the press elevation for the chips. | | `closeSearchIcon` | Icon | The icon button that hides the search field . | | `colorator` | Color Function(V) | Set the selected chip color of individual items based on their value. | | `decoration` | BoxDecoration | Style the surrounding Container. | diff --git a/example/pubspec.lock b/example/pubspec.lock index 31e424f..d9818f4 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -42,7 +42,7 @@ packages: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.15.0" + version: "1.16.0" cupertino_icons: dependency: "direct main" description: @@ -56,7 +56,7 @@ packages: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.0" flutter: dependency: "direct main" description: flutter @@ -80,7 +80,7 @@ packages: name: material_color_utilities url: "https://pub.dartlang.org" source: hosted - version: "0.1.3" + version: "0.1.4" meta: dependency: transitive description: @@ -94,14 +94,14 @@ packages: path: ".." relative: true source: path - version: "4.1.2" + version: "4.1.3" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.0" + version: "1.8.1" sky_engine: dependency: transitive description: flutter @@ -113,7 +113,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.1" + version: "1.8.2" stack_trace: dependency: transitive description: @@ -148,20 +148,13 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.8" - typed_data: - dependency: transitive - description: - name: typed_data - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" + version: "0.4.9" vector_math: dependency: transitive description: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.1" + version: "2.1.2" sdks: - dart: ">=2.14.0 <3.0.0" + dart: ">=2.17.0-0 <3.0.0" diff --git a/lib/chip_field/multi_select_chip_field.dart b/lib/chip_field/multi_select_chip_field.dart index 1f420ce..c8c0987 100644 --- a/lib/chip_field/multi_select_chip_field.dart +++ b/lib/chip_field/multi_select_chip_field.dart @@ -59,6 +59,15 @@ class MultiSelectChipField extends FormField> { /// Set the header color. final Color? headerColor; + /// Set the shadow color of the Chip. + final Color? chipShadowColor; + + /// Set the elevation of the Chip. + final double? chipElevation; + + /// Set the press elevation of the Chip. + final double? chipPressElevation; + /// Build a custom widget that gets created dynamically for each item. final Widget Function(MultiSelectItem, FormFieldState>)? itemBuilder; @@ -104,6 +113,9 @@ class MultiSelectChipField extends FormField> { this.searchHintStyle, this.searchTextStyle, this.headerColor, + this.chipShadowColor, + this.chipElevation, + this.chipPressElevation, this.key, this.onSaved, this.validator, @@ -143,6 +155,9 @@ class MultiSelectChipField extends FormField> { searchHintStyle: searchHintStyle, searchTextStyle: searchTextStyle, headerColor: headerColor, + chipShadowColor: chipShadowColor, + chipElevation: chipElevation, + chipPressElevation: chipPressElevation, itemBuilder: itemBuilder, height: height, scrollControl: scrollControl, @@ -179,6 +194,9 @@ class _MultiSelectChipFieldView extends StatefulWidget final Color? Function(V)? colorator; final Function(List)? onTap; final Color? headerColor; + final Color? chipShadowColor; + final double? chipElevation; + final double? chipPressElevation; final Widget Function(MultiSelectItem, FormFieldState>)? itemBuilder; final double? height; @@ -210,6 +228,9 @@ class _MultiSelectChipFieldView extends StatefulWidget this.searchHintStyle, this.searchTextStyle, this.headerColor, + this.chipShadowColor, + this.chipElevation, + this.chipPressElevation, this.itemBuilder, this.height, this.scrollControl, @@ -242,6 +263,9 @@ class _MultiSelectChipFieldView extends StatefulWidget searchTextStyle = field.searchTextStyle, searchHintStyle = field.searchHintStyle, headerColor = field.headerColor, + chipShadowColor = field.chipShadowColor, + chipElevation = field.chipElevation, + chipPressElevation = field.chipPressElevation, itemBuilder = field.itemBuilder, height = field.height, scrollControl = field.scrollControl, @@ -453,6 +477,9 @@ class __MultiSelectChipFieldViewState margin: EdgeInsets.all(0), padding: const EdgeInsets.all(2.0), child: ChoiceChip( + elevation: widget.chipElevation, + pressElevation: widget.chipPressElevation, + shadowColor: widget.chipShadowColor, shape: widget.chipShape as OutlinedBorder? ?? RoundedRectangleBorder( side: BorderSide( diff --git a/pubspec.lock b/pubspec.lock index e4e496b..4714166 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -42,14 +42,14 @@ packages: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.15.0" + version: "1.16.0" fake_async: dependency: transitive description: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.0" flutter: dependency: "direct main" description: flutter @@ -73,7 +73,7 @@ packages: name: material_color_utilities url: "https://pub.dartlang.org" source: hosted - version: "0.1.3" + version: "0.1.4" meta: dependency: transitive description: @@ -87,7 +87,7 @@ packages: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.0" + version: "1.8.1" sky_engine: dependency: transitive description: flutter @@ -99,7 +99,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.1" + version: "1.8.2" stack_trace: dependency: transitive description: @@ -134,20 +134,13 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.8" - typed_data: - dependency: transitive - description: - name: typed_data - url: "https://pub.dartlang.org" - source: hosted - version: "1.3.0" + version: "0.4.9" vector_math: dependency: transitive description: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.1" + version: "2.1.2" sdks: - dart: ">=2.14.0 <3.0.0" + dart: ">=2.17.0-0 <3.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 50eff1c..1e676fd 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: multi_select_flutter description: A flexible multi select package for Flutter. Make multi select widgets the way you want. -version: 4.1.2 +version: 4.1.3 repository: https://github.com/CHB61/flutter-multi-select issue_tracker: https://github.com/CHB61/flutter-multi-select documentation: https://github.com/CHB61/flutter-multi-select