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