Pull to refresh

This commit is contained in:
LittleSheep 2024-03-24 11:35:18 +08:00
parent e74aba2d8b
commit b32a7216b5

View File

@ -64,7 +64,11 @@ class _ExploreScreenState extends State<ExploreScreen> {
@override
Widget build(BuildContext context) {
return Scaffold(
body: PagedListView<int, Feed>(
body: RefreshIndicator(
onRefresh: () async {
paginationController.refresh();
},
child: PagedListView<int, Feed>(
pagingController: paginationController,
builderDelegate: PagedChildBuilderDelegate<Feed>(
itemBuilder: (context, item, index) => FeedItem(
@ -72,6 +76,7 @@ class _ExploreScreenState extends State<ExploreScreen> {
),
),
),
),
floatingActionButton: FutureBuilder(
future: authClient.isAuthorized(),
builder: (context, snapshot) {