-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from nubank/poc/nuvigator-navigator
[V2] Nuvigator
- Loading branch information
Showing
49 changed files
with
2,147 additions
and
971 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
builders: | ||
nuvigator: | ||
import: "package:nuvigator/builder.dart" | ||
builder_factories: ["nuvigatorBuilder"] | ||
build_extensions: {".dart": [".nuvigator.g.part"]} | ||
auto_apply: dependents | ||
build_to: cache | ||
applies_builders: ["source_gen|combining_builder"] |
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
15 changes: 0 additions & 15 deletions
15
example/lib/samples/modules/sample_one/navigation/sample_one_navigation.dart
This file was deleted.
Oops, something went wrong.
28 changes: 17 additions & 11 deletions
28
example/lib/samples/modules/sample_one/navigation/sample_one_router.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,26 +1,32 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:nuvigator/nuvigator.dart'; | ||
|
||
import '../screen/screen_one.dart'; | ||
import '../screen/screen_two.dart'; | ||
import 'sample_one_routes.dart'; | ||
|
||
part 'sample_one_router.g.dart'; | ||
|
||
const screenOneDeepLink = | ||
'exapp://deepPrefix/sampleOne/screenOne/id_1234_deepLink'; | ||
|
||
class _SampleOneRouter extends SimpleRouter { | ||
@NuRouter() | ||
class SampleOneRouter extends BaseRouter { | ||
@override | ||
String get deepLinkPrefix => '/sampleOne/'; | ||
|
||
@override | ||
Map<String, Screen> get screensMap => { | ||
SampleOneRoutes.screen_one: s1ScreenOnePage, | ||
SampleOneRoutes.screen_two: s1ScreenTwoPage, | ||
}; | ||
@NuRoute(deepLink: 'screenOne/:testId') | ||
ScreenRoute screenOne({@required String testId}) => const ScreenRoute( | ||
builder: ScreenOne.builder, | ||
); | ||
|
||
@NuRoute() | ||
ScreenRoute<int> screenTwo() => const ScreenRoute<int>( | ||
builder: ScreenTwo.builder, | ||
); | ||
|
||
@override | ||
Map<String, String> get deepLinksMap => { | ||
'screenOne/:testId': SampleOneRoutes.screen_one, | ||
}; | ||
Map<RouteDef, ScreenRouteBuilder> get screensMap => | ||
_$sampleOneScreensMap(this); | ||
} | ||
|
||
final sampleOneRouter = _SampleOneRouter(); | ||
final sampleOneRouter = SampleOneRouter(); |
Oops, something went wrong.