Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions .swm/go-router.claiboeb.sw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
title: Go Router
---
<SwmSnippet path="/lib/src/utilities/go_router_init.dart" line="11">

---

&nbsp;

```dart
GoRouter routerinit = GoRouter(
routes: <RouteBase>[
/// =================================================================
/// ********************** Splash Route *****************************
/// ==================================================================
GoRoute(
name: AppRoutes.SPLASH_ROUTE_NAME,
path: AppRoutes.SPLASH_ROUTE_PATH,
builder: (BuildContext context, GoRouterState state) {
return const SplashScreen();
},
),

/// =================================================================
/// ********************** Authentication Routes ********************
/// ==================================================================
GoRoute(
name: AppRoutes.LOGIN_ROUTE_NAME,
path: AppRoutes.LOGIN_ROUTE_PATH,
builder: (BuildContext context, GoRouterState state) {
return const SignInPage();
},
),
GoRoute(
name: AppRoutes.SIGNUP_ROUTE_NAME,
path: AppRoutes.SIGNUP_ROUTE_PATH,
builder: (BuildContext context, GoRouterState state) {
return const SignUnPage();
},
),

/// =================================================================
/// ********************** DashBoard Route ******************************
/// ==================================================================
GoRoute(
name: AppRoutes.DASHBOARD_ROUTE_NAME,
path: AppRoutes.DASHBOARD_ROUTE_PATH,
builder: (BuildContext context, GoRouterState state) {
return const DashBoardScreen();
},

),
],
errorPageBuilder: (context, state) {
return const MaterialPage(child: ErrorScreen());
},
redirect: (context, state) {
logger.info('redirect: ${state.uri}');
return null;
},
);
```

---

</SwmSnippet>

<SwmToken path="/lib/src/utilities/go_router_init.dart" pos="17:4:4" line-data=" name: AppRoutes.SPLASH_ROUTE_NAME,">`AppRoutes`</SwmToken>

<SwmMeta version="3.0.0" repo-id="Z2l0aHViJTNBJTNBZmx1dHRlci1ibG9jLWNsZWFuLWFyY2hpdGVjdHVyZS1ib2lsZXJwbGF0ZSUzQSUzQWlzaGl0Z2FtaQ==" repo-name="flutter-bloc-clean-architecture-boilerplate"><sup>Powered by [Swimm](https://app.swimm.io/)</sup></SwmMeta>
3 changes: 3 additions & 0 deletions .swm/swimm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"repo_id": "Z2l0aHViJTNBJTNBZmx1dHRlci1ibG9jLWNsZWFuLWFyY2hpdGVjdHVyZS1ib2lsZXJwbGF0ZSUzQSUzQWlzaGl0Z2FtaQ=="
}