make header pretty and functional

This commit is contained in:
krawieck 2020-10-05 21:55:33 +02:00
parent cc99071ff9
commit 864c8a3948
1 changed files with 18 additions and 2 deletions

View File

@ -93,6 +93,16 @@ class HomeTab extends HookWidget {
} }
} }
final title = () {
final first = selectedList.value.listingType == PostListingType.subscribed
? 'Subscribed'
: 'All';
final last = selectedList.value.instanceUrl == null
? ''
: '@${selectedList.value.instanceUrl}';
return '$first$last';
}();
return Scaffold( return Scaffold(
appBar: AppBar( appBar: AppBar(
actions: [ actions: [
@ -115,8 +125,14 @@ class HomeTab extends HookWidget {
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Text('Subscribed'), Text(
Icon(Icons.arrow_drop_down), title,
style: TextStyle(color: theme.textTheme.headline6.color),
),
Icon(
Icons.arrow_drop_down,
color: theme.textTheme.headline6.color,
),
], ],
)), )),
), ),