Skip to content

Commit

Permalink
better popular page
Browse files Browse the repository at this point in the history
  • Loading branch information
Predidit committed May 28, 2024
1 parent 18fe934 commit 4a3cc0a
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions lib/pages/popular/popular_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ class _PopularPageState extends State<PopularPage>
popularController
.queryBangumi(popularController.searchKeyword);
} else {
popularController.searchKeyword = '';
popularController.queryBangumiListFeed();
}
},
Expand Down Expand Up @@ -191,13 +192,22 @@ class _PopularPageState extends State<PopularPage>
})),
],
),
floatingActionButton: FloatingActionButton(
onPressed: () {
scrollController.jumpTo(0.0);
popularController.scrollOffset = 0.0;
},
child: const Icon(Icons.arrow_upward),
),
floatingActionButton: (Platform.isAndroid || Platform.isIOS)
? FloatingActionButton(
onPressed: () {
scrollController.jumpTo(0.0);
popularController.scrollOffset = 0.0;
},
child: const Icon(Icons.arrow_upward),
)
: FloatingActionButton(
onPressed: () {
_controller.clear();
popularController.searchKeyword = '';
popularController.queryBangumiListFeed();
},
child: const Icon(Icons.refresh),
),
// backgroundColor: themedata.colorScheme.primaryContainer,
),
),
Expand Down

0 comments on commit 4a3cc0a

Please sign in to comment.