From d3c141d3a54f3d01d077157ce934fff156c6fc14 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Sun, 25 Sep 2022 09:04:47 +0200 Subject: [PATCH] Carousel example: replace YaruRow with ButtonBar (#224) Ref: #200 --- example/lib/pages/carousel_page.dart | 37 +++++++++++++--------------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/example/lib/pages/carousel_page.dart b/example/lib/pages/carousel_page.dart index 5d7504fdc..dbd1c5adb 100644 --- a/example/lib/pages/carousel_page.dart +++ b/example/lib/pages/carousel_page.dart @@ -31,27 +31,24 @@ class _CarouselPageState extends State { 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)) + ], + ) ]); }