This repository has been archived on 2024-06-08. You can view files and clone it, but cannot push or open issues or pull requests.
SolarAgent/lib/router.dart

34 lines
987 B
Dart
Raw Normal View History

import 'package:go_router/go_router.dart';
2024-03-24 04:22:29 +00:00
import 'package:solaragent/models/feed.dart';
import 'package:solaragent/screens/account.dart';
2024-03-23 15:05:04 +00:00
import 'package:solaragent/screens/explore.dart';
import 'package:solaragent/screens/notifications.dart';
2024-03-24 04:22:29 +00:00
import 'package:solaragent/screens/publish/comment_editor.dart';
2024-03-23 17:22:01 +00:00
import 'package:solaragent/screens/publish/moment_editor.dart';
final router = GoRouter(
routes: [
GoRoute(
path: '/',
2024-03-23 15:05:04 +00:00
builder: (context, state) => const ExploreScreen(),
),
GoRoute(
path: '/notifications',
builder: (context, state) => const NotificationScreen(),
),
GoRoute(
path: '/account',
builder: (context, state) => const AccountScreen(),
2024-03-23 17:22:01 +00:00
),
GoRoute(
path: '/post/moments',
builder: (context, state) => const MomentEditorScreen(),
),
2024-03-24 04:22:29 +00:00
GoRoute(
path: '/post/comments',
builder: (context, state) =>
CommentEditorScreen(parent: state.extra as Feed),
),
],
2024-03-23 17:22:01 +00:00
);