You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18-16Lines changed: 18 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,25 +27,27 @@ A lightweight router designed for ease of use and efficient state management.
27
27
Create classes that extend `RouteState` for each distinct route in your application. These classes encapsulate the path and can manage query parameters.
28
28
29
29
```dart
30
-
// Define specific route states for type safety and clarity
30
+
// Define specific route states for type safety and clarity.
31
31
final class HomeRouteState extends RouteState {
32
-
HomeRouteState() : super.parse('/home');
32
+
HomeRouteState()
33
+
: super.parse(
34
+
'/home',
35
+
// Use QuickForwardtEffect() as the default transtion effect for this
36
+
// route. This can be overridden when pushing this route.
37
+
animationEffect: QuickForwardtEffect(),
38
+
);
33
39
}
34
40
35
-
final class MessagesRouteState extends RouteState {
36
-
MessagesRouteState() : super.parse('/messages');
37
-
}
38
-
39
-
// Route state with specific query parameters
40
-
final class MessagesWithQueryRouteState extends RouteState {
0 commit comments