Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 6ed0144

Browse files
authoredSep 16, 2024··
Merge pull request #1427 from ShahSomething/choice-chip-fields
feat: #1317 Added a new property to form_builder_choice_chip
2 parents e854da2 + f642e0f commit 6ed0144

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed
 

‎example/pubspec.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ packages:
6060
path: ".."
6161
relative: true
6262
source: path
63-
version: "9.4.0"
63+
version: "9.4.1"
6464
flutter_lints:
6565
dependency: "direct dev"
6666
description:
@@ -224,10 +224,10 @@ packages:
224224
dependency: transitive
225225
description:
226226
name: vm_service
227-
sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc
227+
sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
228228
url: "https://pub.dev"
229229
source: hosted
230-
version: "14.2.4"
230+
version: "14.2.5"
231231
sdks:
232232
dart: ">=3.5.0 <4.0.0"
233233
flutter: ">=3.24.0"

‎lib/src/fields/form_builder_choice_chips.dart

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,14 @@ class FormBuilderChoiceChip<T> extends FormBuilderFieldDecoration<T> {
252252

253253
final ShapeBorder avatarBorder;
254254

255+
/// Indicates whether a checkmark should be displayed on the selected choice chip.
256+
///
257+
/// Defaults to `true`.
258+
///
259+
/// When set to `true`, a checkmark will appear on the selected chip to visually
260+
/// indicate its selection status. If set to `false`, no checkmark will be shown.
261+
final bool showCheckmark;
262+
255263
/// Creates a list of `Chip`s that acts like radio buttons
256264
FormBuilderChoiceChip({
257265
super.autovalidateMode = AutovalidateMode.disabled,
@@ -290,6 +298,7 @@ class FormBuilderChoiceChip<T> extends FormBuilderFieldDecoration<T> {
290298
this.textDirection,
291299
this.verticalDirection = VerticalDirection.down,
292300
this.visualDensity,
301+
this.showCheckmark = true,
293302
}) : super(builder: (FormFieldState<T?> field) {
294303
final state = field as _FormBuilderChoiceChipState<T>;
295304

@@ -330,6 +339,7 @@ class FormBuilderChoiceChip<T> extends FormBuilderFieldDecoration<T> {
330339
padding: padding,
331340
visualDensity: visualDensity,
332341
avatarBorder: avatarBorder,
342+
showCheckmark: showCheckmark,
333343
),
334344
],
335345
),

‎pubspec.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,10 @@ packages:
204204
dependency: transitive
205205
description:
206206
name: vm_service
207-
sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc
207+
sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
208208
url: "https://pub.dev"
209209
source: hosted
210-
version: "14.2.4"
210+
version: "14.2.5"
211211
sdks:
212212
dart: ">=3.5.0 <4.0.0"
213213
flutter: ">=3.24.0"

0 commit comments

Comments
 (0)
Please sign in to comment.