Skip to content

Commit

Permalink
Add buttonIndexedTextBuilder example
Browse files Browse the repository at this point in the history
  • Loading branch information
Frezyx committed May 18, 2023
1 parent 3f888d6 commit 55e81e7
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions example/lib/examples/button_builder_example/example.dart
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,24 @@ class _ButtonBuilderExampleState extends State<ButtonBuilderExample> {
onSelected: (val, i, selected) =>
debugPrint('Button: $val index: $i $selected'),
),
SizedBox(height: 16),
Padding(
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 20),
child: Text(
'Text builder example',
style: theme.textTheme.headlineSmall,
),
),
GroupButton(
controller: _radioController,
isRadio: true,
options: GroupButtonOptions(groupingType: GroupingType.wrap),
buttons: _radioButtons,
buttonIndexedTextBuilder: (selected, index, context) =>
_radioButtons[index] + ' [built]',
onSelected: (val, i, selected) =>
debugPrint('Button: $val index: $i $selected'),
),
],
),
);
Expand Down

0 comments on commit 55e81e7

Please sign in to comment.