Skip to content

Commit

Permalink
Carousel example: replace YaruRow with ButtonBar (#224)
Browse files Browse the repository at this point in the history
Ref: #200
  • Loading branch information
jpnurmi authored Sep 25, 2022
1 parent 04bcd45 commit d3c141d
Showing 1 changed file with 17 additions and 20 deletions.
37 changes: 17 additions & 20 deletions example/lib/pages/carousel_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,27 +31,24 @@ class _CarouselPageState extends State<CarouselPage> {
autoScroll: true,
),
]),
YaruRow(
width: 300,
trailingWidget: Text('length: $length'),
actionWidget: Row(
children: [
YaruOptionButton(
onPressed: () => setState(() {
length++;
}),
child: Icon(YaruIcons.plus)),
SizedBox(
width: 10,
),
YaruOptionButton(
onPressed: () => setState(() {
length >= 2 ? length-- : length = length;
}),
child: Icon(YaruIcons.minus))
],
ButtonBar(
buttonPadding: EdgeInsets.zero,
children: [
YaruOptionButton(
onPressed: () => setState(() {
length++;
}),
child: Icon(YaruIcons.plus)),
SizedBox(
width: 10,
),
enabled: true)
YaruOptionButton(
onPressed: () => setState(() {
length >= 2 ? length-- : length = length;
}),
child: Icon(YaruIcons.minus))
],
)
]);
}

Expand Down

0 comments on commit d3c141d

Please sign in to comment.