Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add itemDecoration to checkbox groups nad radio groups to add borders to checkboxes and radio buttons #1344

Prev Previous commit
Next Next commit
More elabore example
freemansoft committed Dec 24, 2023

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
commit b32fb7bbe8a2988c17efddd8e88240dc3e6f833a
23 changes: 19 additions & 4 deletions example/lib/sources/decorated_radio_checkbox.dart
Original file line number Diff line number Diff line change
@@ -19,8 +19,10 @@ class _DecoratedRadioCheckboxState extends State<DecoratedRadioCheckbox> {
child: Column(
children: <Widget>[
const SizedBox(height: 20),
// this text appears correctly if the textScaler <> 1.0
const Text(
'Checkboxes: control leading - label area is a column of Widgets - wrapSpacing 5.0'),
'Checkboxes: control leading - with itemDecoration- label area is a column of Widgets - wrapSpacing 5.0',
textScaler: TextScaler.linear(1.01)),
FormBuilderCheckboxGroup(
name: 'aCheckboxGroup',
options: getDemoOptionsWidgets(),
@@ -31,7 +33,8 @@ class _DecoratedRadioCheckboxState extends State<DecoratedRadioCheckbox> {
),
const SizedBox(height: 20),
const Text(
'Checkboxes: control trailing - label area is a column of Widgets - wrapSpacing 5.0'),
'Checkboxes: control trailing - with itemDecoration - label area is a column of Widgets - wrapSpacing 5.0',
textScaler: TextScaler.linear(1.01)),
FormBuilderCheckboxGroup(
name: 'aCheckboxGroup',
options: getDemoOptionsWidgets(),
@@ -43,7 +46,8 @@ class _DecoratedRadioCheckboxState extends State<DecoratedRadioCheckbox> {
),
const SizedBox(height: 20),
const Text(
'Radio: control leading - label area is a column of Widgets - wrapSpacing 5.0'),
'Radio: control leading - with itemDecoration - label area is a column of Widgets - wrapSpacing 5.0',
textScaler: TextScaler.linear(1.01)),
FormBuilderRadioGroup(
name: 'aRadioGroup',
options: getDemoOptionsWidgets(),
@@ -54,7 +58,8 @@ class _DecoratedRadioCheckboxState extends State<DecoratedRadioCheckbox> {
),
const SizedBox(height: 20),
const Text(
'Radio: control leading - label area just the value - wrapSpacing 10.0'),
'Radio: control leading - with itemDecoration - label area just the value - wrapSpacing 10.0',
textScaler: TextScaler.linear(1.01)),
FormBuilderRadioGroup(
name: 'aRadioGroup2',
options: getDemoOptions(),
@@ -64,6 +69,16 @@ class _DecoratedRadioCheckboxState extends State<DecoratedRadioCheckbox> {
borderRadius: BorderRadius.circular(5.0)),
),
const SizedBox(height: 20),
const Text(
'Radio: control leading - no itemDecoration - label area just the value - wrapSpacing 10.0',
textScaler: TextScaler.linear(1.01)),

FormBuilderRadioGroup(
name: 'aRadioGroup2',
options: getDemoOptions(),
wrapSpacing: 10.0,
),
const SizedBox(height: 20),
],
),
);