ui backbone
This commit is contained in:
parent
3e374d24f6
commit
b7045fc242
24 changed files with 918 additions and 73 deletions
|
@ -1,6 +1,7 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:mc_gallery/features/home/views/gallery/gallery_view.dart';
|
||||
import 'package:mc_gallery/features/home/views/image_carousel/image_carousel_view.dart';
|
||||
|
||||
import '../../views/error_page_view.dart';
|
||||
import 'routes.dart';
|
||||
|
@ -14,12 +15,21 @@ class McgRouter {
|
|||
key: state.pageKey,
|
||||
child: ErrorPageView(error: state.error),
|
||||
),
|
||||
// TODO Add Redirect
|
||||
//todo(mehul): Add Redirect
|
||||
routes: [
|
||||
GoRoute(
|
||||
path: Routes.home.routePath,
|
||||
name: Routes.home.routeName,
|
||||
builder: (context, _) => const GalleryView(),
|
||||
routes: [
|
||||
GoRoute(
|
||||
path: Routes.imageCarousel.routePath,
|
||||
name: Routes.imageCarousel.routeName,
|
||||
builder: (context, state) => ImageCarouselView(
|
||||
imageCarouselViewArguments: state.extra as ImageCarouselViewArguments,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
);
|
||||
|
|
|
@ -4,7 +4,7 @@ enum Routes {
|
|||
routeName: 'Home',
|
||||
)),
|
||||
imageCarousel(RoutesInfo(
|
||||
routePath: '/image_carousel',
|
||||
routePath: 'image_carousel',
|
||||
routeName: 'Image Carousel',
|
||||
));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue