make listing type selection more universal
This commit is contained in:
parent
fc256d800d
commit
81fa4aac86
|
@ -61,23 +61,15 @@ class HomeTab extends HookWidget {
|
||||||
VisualDensity(vertical: VisualDensity.minimumDensity),
|
VisualDensity(vertical: VisualDensity.minimumDensity),
|
||||||
leading: SizedBox.shrink(),
|
leading: SizedBox.shrink(),
|
||||||
),
|
),
|
||||||
|
for (final listingType in [
|
||||||
|
PostListingType.subscribed,
|
||||||
|
PostListingType.local,
|
||||||
|
PostListingType.all,
|
||||||
|
])
|
||||||
ListTile(
|
ListTile(
|
||||||
title: const Text('Subscribed'),
|
title: Text(listingType.value),
|
||||||
leading: const SizedBox(width: 20, height: 20),
|
leading: const SizedBox(width: 20, height: 20),
|
||||||
onTap: () => pop(const _SelectedList(
|
onTap: () => pop(_SelectedList(listingType: listingType)),
|
||||||
listingType: PostListingType.subscribed)),
|
|
||||||
),
|
|
||||||
ListTile(
|
|
||||||
title: const Text('Local'),
|
|
||||||
leading: const SizedBox(width: 20, height: 20),
|
|
||||||
onTap: () => pop(
|
|
||||||
const _SelectedList(listingType: PostListingType.local)),
|
|
||||||
),
|
|
||||||
ListTile(
|
|
||||||
title: const Text('All'),
|
|
||||||
leading: const SizedBox(width: 20, height: 20),
|
|
||||||
onTap: () => pop(
|
|
||||||
const _SelectedList(listingType: PostListingType.all)),
|
|
||||||
),
|
),
|
||||||
for (final instance in accStore.instances) ...[
|
for (final instance in accStore.instances) ...[
|
||||||
const Padding(
|
const Padding(
|
||||||
|
|
Loading…
Reference in New Issue