Skip to content

Commit

Permalink
Add refresh event in launches and news initState
Browse files Browse the repository at this point in the history
  • Loading branch information
ivirtex committed Dec 24, 2023
1 parent a033727 commit 5281d5c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/launches/view/launches_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ class _LaunchesPageState extends State<LaunchesPage> {
void initState() {
super.initState();

context.read<LaunchesBloc>().add(const LaunchesRefreshRequested());

scrollController.addListener(() {
if (scrollController.offset > 0) {
if (!shouldShowFab) {
Expand Down
2 changes: 2 additions & 0 deletions lib/news/view/news_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ class _NewsViewState extends State<NewsView> {
void initState() {
super.initState();

context.read<NewsBloc>().add(const NewsFetchRequested());

scrollController.addListener(() {
if (scrollController.offset > 0) {
if (!shouldShowFab) {
Expand Down

0 comments on commit 5281d5c

Please sign in to comment.