Skip to content

Commit

Permalink
java 17
Browse files Browse the repository at this point in the history
  • Loading branch information
hoc081098 committed Sep 3, 2024
1 parent 8037045 commit 6fa7dcd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/flutter-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
java-version: '17'

- uses: subosito/flutter-action@v2.4.0
with:
Expand Down
19 changes: 7 additions & 12 deletions examples/flutter/github_search/lib/search_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -115,17 +115,12 @@ class SearchScreenState extends State<SearchScreen> {
}

Widget _buildChild(SearchState state) {
switch (state) {
case SearchNoTerm():
return const SearchIntro();
case SearchEmpty():
return const EmptyWidget();
case SearchLoading():
return const LoadingWidget();
case SearchError():
return const SearchErrorWidget();
case SearchPopulated():
return SearchResultWidget(items: state.result.items);
}
return switch (state) {
SearchNoTerm() => const SearchIntro(),
SearchEmpty() => const EmptyWidget(),
SearchLoading() => const LoadingWidget(),
SearchError() => const SearchErrorWidget(),
SearchPopulated() => SearchResultWidget(items: state.result.items)
};
}
}

0 comments on commit 6fa7dcd

Please sign in to comment.