@@ -395,57 +395,60 @@ class FormBuilderChoiceChip<T> extends FormBuilderFieldDecoration<T> {
395395 }) : super (builder: (FormFieldState <T ?> field) {
396396 final state = field as _FormBuilderChoiceChipState <T >;
397397
398- return InputDecorator (
399- decoration: state.decoration,
400- isFocused: state.effectiveFocusNode.hasFocus,
401- child: Wrap (
402- direction: direction,
403- alignment: alignment,
404- crossAxisAlignment: crossAxisAlignment,
405- runAlignment: runAlignment,
406- runSpacing: runSpacing,
407- spacing: spacing,
408- textDirection: textDirection,
409- verticalDirection: verticalDirection,
410- children: < Widget > [
411- for (FormBuilderChipOption <T > option in options)
412- ChoiceChip (
413- label: option,
414- side: side,
415- shape: shape,
416- selected: field.value == option.value,
417- onSelected: state.enabled
418- ? (selected) {
419- final choice = selected ? option.value : null ;
420- state.didChange (choice);
421- }
422- : null ,
423- avatar: option.avatar,
424- selectedColor: selectedColor,
425- disabledColor: disabledColor,
426- backgroundColor: backgroundColor,
427- shadowColor: shadowColor,
428- selectedShadowColor: selectedShadowColor,
429- elevation: elevation,
430- pressElevation: pressElevation,
431- materialTapTargetSize: materialTapTargetSize,
432- labelStyle: labelStyle,
433- labelPadding: labelPadding,
434- padding: padding,
435- visualDensity: visualDensity,
436- avatarBorder: avatarBorder,
437- showCheckmark: showCheckmark,
438- surfaceTintColor: surfaceTintColor,
439- clipBehavior: clipBehavior,
440- checkmarkColor: checkmarkColor,
441- autofocus: autofocus,
442- avatarBoxConstraints: avatarBoxConstraints,
443- chipAnimationStyle: chipAnimationStyle,
444- color: color,
445- iconTheme: iconTheme,
446- tooltip: tooltip,
447- ),
448- ],
398+ return Focus (
399+ focusNode: state.effectiveFocusNode,
400+ child: InputDecorator (
401+ decoration: state.decoration,
402+ isFocused: state.effectiveFocusNode.hasFocus,
403+ child: Wrap (
404+ direction: direction,
405+ alignment: alignment,
406+ crossAxisAlignment: crossAxisAlignment,
407+ runAlignment: runAlignment,
408+ runSpacing: runSpacing,
409+ spacing: spacing,
410+ textDirection: textDirection,
411+ verticalDirection: verticalDirection,
412+ children: < Widget > [
413+ for (FormBuilderChipOption <T > option in options)
414+ ChoiceChip (
415+ label: option,
416+ side: side,
417+ shape: shape,
418+ selected: field.value == option.value,
419+ onSelected: state.enabled
420+ ? (selected) {
421+ final choice = selected ? option.value : null ;
422+ state.didChange (choice);
423+ }
424+ : null ,
425+ avatar: option.avatar,
426+ selectedColor: selectedColor,
427+ disabledColor: disabledColor,
428+ backgroundColor: backgroundColor,
429+ shadowColor: shadowColor,
430+ selectedShadowColor: selectedShadowColor,
431+ elevation: elevation,
432+ pressElevation: pressElevation,
433+ materialTapTargetSize: materialTapTargetSize,
434+ labelStyle: labelStyle,
435+ labelPadding: labelPadding,
436+ padding: padding,
437+ visualDensity: visualDensity,
438+ avatarBorder: avatarBorder,
439+ showCheckmark: showCheckmark,
440+ surfaceTintColor: surfaceTintColor,
441+ clipBehavior: clipBehavior,
442+ checkmarkColor: checkmarkColor,
443+ autofocus: autofocus,
444+ avatarBoxConstraints: avatarBoxConstraints,
445+ chipAnimationStyle: chipAnimationStyle,
446+ color: color,
447+ iconTheme: iconTheme,
448+ tooltip: tooltip,
449+ ),
450+ ],
451+ ),
449452 ),
450453 );
451454 });
0 commit comments