-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(#636): routing modules return functions
- Loading branch information
Showing
14 changed files
with
99 additions
and
60 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,16 @@ | ||
import '../common/module.dart'; | ||
import '../drug/module.dart'; | ||
|
||
// For generated routes | ||
export 'pages/search.dart'; | ||
|
||
@RoutePage() | ||
class SearchRootPage extends AutoRouter {} | ||
|
||
final searchRoute = AutoRoute( | ||
AutoRoute searchRoute({ required List<AutoRoute> children }) => AutoRoute( | ||
path: 'search', | ||
page: SearchRootRoute.page, | ||
children: [ | ||
AutoRoute(path: '', page: SearchRoute.page), | ||
drugRoute() | ||
...children, | ||
], | ||
); |
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,17 +1,23 @@ | ||
import '../common/module.dart'; | ||
|
||
// For generated routes | ||
export 'pages/about_us.dart'; | ||
export 'pages/privacy_policy.dart'; | ||
export 'pages/settings.dart'; | ||
export 'pages/terms_and_conditions.dart'; | ||
export 'pages/about.dart'; | ||
export 'pages/more.dart'; | ||
export 'pages/privacy.dart'; | ||
export 'pages/terms.dart'; | ||
|
||
final settingsRoute = AutoRoute( | ||
path: 'settings', | ||
page: SettingsRoute.page, | ||
@RoutePage() | ||
class MoreRootPage extends AutoRouter {} | ||
|
||
AutoRoute aboutRoute() => AutoRoute(path: 'about', page: AboutRoute.page); | ||
AutoRoute privacyRoute() => AutoRoute(path: 'privacy', page: PrivacyRoute.page); | ||
AutoRoute termsRoute() => AutoRoute(path: 'terms', page: TermsRoute.page); | ||
|
||
AutoRoute moreRoute({ required List<AutoRoute> children }) => AutoRoute( | ||
path: 'more', | ||
page: MoreRootRoute.page, | ||
children: [ | ||
AutoRoute(path: 'about', page: AboutUsRoute.page), | ||
AutoRoute(path: 'privacy', page: PrivacyPolicyRoute.page), | ||
AutoRoute(path: 'terms', page: TermsAndConditionsRoute.page), | ||
AutoRoute(path: '', page: MoreRoute.page), | ||
...children, | ||
], | ||
); |
4 changes: 2 additions & 2 deletions
4
app/lib/settings/pages/about_us.dart → app/lib/settings/pages/about.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
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
4 changes: 2 additions & 2 deletions
4
app/lib/settings/pages/privacy_policy.dart → app/lib/settings/pages/privacy.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
4 changes: 2 additions & 2 deletions
4
.../settings/pages/terms_and_conditions.dart → app/lib/settings/pages/terms.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