Skip to content

Commit

Permalink
Merge pull request #1347 from freemansoft/features/itemDecoration-doc…
Browse files Browse the repository at this point in the history
…s-update

Align comments with style and fix errors in docs
  • Loading branch information
deandreamatias authored Dec 29, 2023
2 parents 7f542eb + a3f193f commit 04660f1
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 14 deletions.
5 changes: 2 additions & 3 deletions lib/src/fields/form_builder_checkbox_group.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ class FormBuilderCheckboxGroup<T> extends FormBuilderFieldDecoration<List<T>> {
final ControlAffinity controlAffinity;
final OptionsOrientation orientation;

/// A BoxDecoration that is added to each item if provided
/// WrapSpacing is reused for the the padding inside the itemDecoration
/// on the side opposite from the control
/// Added to each item if provided.
/// [GroupedCheckbox] applies the [itemDecorator] to each Checkbox
final BoxDecoration? itemDecoration;

/// Creates a list of Checkboxes for selecting multiple options
Expand Down
5 changes: 2 additions & 3 deletions lib/src/fields/form_builder_radio_group.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ class FormBuilderRadioGroup<T> extends FormBuilderFieldDecoration<T> {
final WrapAlignment wrapRunAlignment;
final WrapCrossAlignment wrapCrossAxisAlignment;

/// A BoxDecoration that is added to each item if provided
/// WrapSpacing is reused for the the padding inside the itemDecoration
/// on the side opposite from the control
/// Added to each item if provided.
/// [GroupedRadio] applies the [itemDecorator] to each Radio
final BoxDecoration? itemDecoration;

/// Creates field to select one value from a list of Radio Widgets
Expand Down
11 changes: 7 additions & 4 deletions lib/src/widgets/grouped_checkbox.dart
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,13 @@ class GroupedCheckbox<T> extends StatelessWidget {

final ControlAffinity controlAffinity;

/// A BoxDecoration that is added to each item if provided
/// [wrapSpacing] is used as inter-item bottom margin for [Orientation.vertical]
/// [wrapSpacing] is used as inter-item right margin for [Orientation.horizontal].
/// on the side opposite from the control
/// Applied to a [Container] wrapping each item if provided
///
/// If the [orientation] is set to [OptionsOrientation.vertical] then
/// [wrapSpacing] is used as inter-item bottom margin
///
/// If the [orientation] is set to [OptionsOrientation.horizontal] then
/// [wrapSpacing] is used as inter-item right margin
final BoxDecoration? itemDecoration;

const GroupedCheckbox({
Expand Down
11 changes: 7 additions & 4 deletions lib/src/widgets/grouped_radio.dart
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,13 @@ class GroupedRadio<T> extends StatefulWidget {

final ControlAffinity controlAffinity;

/// A BoxDecoration that is added to each item if provided
/// [wrapSpacing] is used as inter-item bottom margin for [Orientation.vertical]
/// [wrapSpacing] is used as inter-item right margin for [Orientation.horizontal].
/// on the side opposite from the control
/// Applied to a [Container] wrapping each item if provided
///
/// If the [orientation] is set to [OptionsOrientation.vertical] then
/// [wrapSpacing] is used as inter-item bottom margin
///
/// If the [orientation] is set to [OptionsOrientation.horizontal] then
/// [wrapSpacing] is used as inter-item right margin
final BoxDecoration? itemDecoration;

const GroupedRadio({
Expand Down

0 comments on commit 04660f1

Please sign in to comment.