add option to not show style button

This commit is contained in:
krawieck 2020-09-29 00:35:05 +02:00
parent ececfaf93e
commit a3b152706a
1 changed files with 7 additions and 4 deletions

View File

@ -8,9 +8,11 @@ import 'bottom_modal.dart';
class PostListOptions extends HookWidget { class PostListOptions extends HookWidget {
final void Function(SortType sort) onChange; final void Function(SortType sort) onChange;
final SortType defaultSort; final SortType defaultSort;
final bool styleButton;
PostListOptions({ PostListOptions({
@required this.onChange, @required this.onChange,
this.styleButton = true,
this.defaultSort = SortType.active, this.defaultSort = SortType.active,
}); });
@ -62,10 +64,11 @@ class PostListOptions extends HookWidget {
), ),
), ),
Spacer(), Spacer(),
IconButton( if (styleButton)
icon: Icon(Icons.view_stream), IconButton(
onPressed: () => print('TBD'), icon: Icon(Icons.view_stream),
) onPressed: () => print('TBD'),
),
], ],
), ),
); );