-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use native navigation instead of getX navigation (#6)
This removes get (getX) as the underlying navigation engine. Since GetX also routes with the native navigation stack, this can be directly used instead of passed to get which then in turn passes it to flutter. While doing this, the services were redesigned and all navigation related matters are now in the navigation service only. BREAKING CHANGE: The `DialogService` was deleted. Dialog related methods are now in the `NavigationService`. BREAKING CHANGE: The `BottomSheetService` was deleted. All related methods are now in the `NavigationService`. BREAKING CHANGE: the close methods for dialog and sheet (`closeDialog` and `closeSheet`) are removed. They are unified in the method `closeOverlay` in the `NavigationService`. BREAKING CHANGE: Since getX is removed, the base logic of the entry point in the app could be simplified. Instead of the key and observer being methods, they are now static initialized fields on the navigation service. BRAKING CHANGE: The `preventDuplicates` parameter for the navigation method is gone. Currently, with native navigation, the user of the package is responsible to have an overview of the navigation stack.
- Loading branch information
Showing
26 changed files
with
816 additions
and
1,123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 5 additions & 4 deletions
9
packages/fluorflow/example/lib/views/detail/detail_viewmodel.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
import 'dart:async'; | ||
|
||
import 'package:example/app.bottom_sheets.dart'; | ||
import 'package:fluorflow/fluorflow.dart'; | ||
|
||
import '../../app.router.dart'; | ||
|
||
final class DetailViewModel extends DataViewModel<int> { | ||
final _navService = locator<NavigationService>(); | ||
final _sheets = locator<BottomSheetService>(); | ||
|
||
DetailViewModel() : super(0); | ||
|
||
void showBottomSheet() => | ||
_sheets.showGreetingBottomSheet(callback: () {}, onElement: (_) {}); | ||
_navService.showGreetingBottomSheet(callback: () {}, onElement: (_) {}); | ||
|
||
void back() => _navService.back(); | ||
|
||
void rootBack() => _navService.rootToHomeView(); | ||
|
||
void addOne() => data += 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 0 additions & 43 deletions
43
packages/fluorflow/lib/src/bottom_sheets/bottom_sheet_service.dart
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.