wip: info page and GET app login / settings
This commit is contained in:
@@ -3,16 +3,21 @@ import 'package:flutter/material.dart';
|
||||
import 'package:furman_now/src/screens/events/index.dart';
|
||||
import 'package:furman_now/src/screens/home/home_header.dart';
|
||||
import 'package:furman_now/src/screens/home/index.dart';
|
||||
import 'package:furman_now/src/screens/info/contacts.dart';
|
||||
import 'package:furman_now/src/screens/info/health_safety.dart';
|
||||
import 'package:furman_now/src/screens/info/hours.dart';
|
||||
import 'package:furman_now/src/screens/info/index.dart';
|
||||
import 'package:furman_now/src/screens/settings/settings.dart';
|
||||
import 'package:furman_now/src/screens/map/index.dart';
|
||||
import 'package:furman_now/src/screens/map/map_category.dart';
|
||||
import 'package:furman_now/src/screens/map/map_home.dart';
|
||||
import 'package:furman_now/src/screens/student_id/index.dart';
|
||||
import 'package:furman_now/src/utils/hero_empty_router_page.dart';
|
||||
import 'package:furman_now/src/utils/translucent_route.dart';
|
||||
|
||||
import '../layouts/main/index.dart';
|
||||
|
||||
Route<T> mapRouteBuilder<T>(BuildContext context, Widget child, CustomPage<T> page){
|
||||
Route<T> mapRouteBuilder<T>(BuildContext context, Widget child, CustomPage<T> page) {
|
||||
return TranslucentRoute(
|
||||
settings: page,
|
||||
transitionDuration: const Duration(milliseconds: 200),
|
||||
@@ -24,7 +29,7 @@ Route<T> mapRouteBuilder<T>(BuildContext context, Widget child, CustomPage<T> pa
|
||||
child: child,
|
||||
),
|
||||
),
|
||||
pageBuilder: (context) => child,
|
||||
pageBuilder: (context, _, __) => child,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -58,7 +63,13 @@ Route<T> mapRouteBuilder<T>(BuildContext context, Widget child, CustomPage<T> pa
|
||||
),
|
||||
]),
|
||||
AutoRoute(path: "events", page: EventsScreen),
|
||||
AutoRoute(path: "info", page: InfoScreen),
|
||||
AutoRoute(path: "info", name: "InfoPageRouter", page: HeroEmptyRouterPage, children: [
|
||||
AutoRoute(path: "", page: InfoScreen),
|
||||
AutoRoute(path: "health-and-safety", page: HealthSafetyScreen),
|
||||
AutoRoute(path: "contacts", page: ContactsScreen),
|
||||
AutoRoute(path: "hours", page: HoursScreen),
|
||||
AutoRoute(path: "settings", page: SettingsScreen),
|
||||
]),
|
||||
]),
|
||||
],
|
||||
)
|
||||
|
@@ -11,115 +11,153 @@
|
||||
// ignore_for_file: type=lint
|
||||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'package:auto_route/auto_route.dart' as _i10;
|
||||
import 'package:flutter/material.dart' as _i11;
|
||||
import 'package:auto_route/auto_route.dart' as _i15;
|
||||
import 'package:flutter/material.dart' as _i16;
|
||||
|
||||
import '../layouts/main/index.dart' as _i1;
|
||||
import '../screens/events/index.dart' as _i4;
|
||||
import '../screens/home/home_header.dart' as _i6;
|
||||
import '../screens/home/index.dart' as _i2;
|
||||
import '../screens/info/index.dart' as _i5;
|
||||
import '../screens/info/contacts.dart' as _i12;
|
||||
import '../screens/info/health_safety.dart' as _i11;
|
||||
import '../screens/info/hours.dart' as _i13;
|
||||
import '../screens/info/index.dart' as _i10;
|
||||
import '../screens/map/index.dart' as _i3;
|
||||
import '../screens/map/map_category.dart' as _i9;
|
||||
import '../screens/map/map_home.dart' as _i8;
|
||||
import '../screens/map/state.dart' as _i13;
|
||||
import '../screens/map/state.dart' as _i18;
|
||||
import '../screens/settings/settings.dart' as _i14;
|
||||
import '../screens/student_id/index.dart' as _i7;
|
||||
import 'index.dart' as _i12;
|
||||
import '../utils/hero_empty_router_page.dart' as _i5;
|
||||
import 'index.dart' as _i17;
|
||||
|
||||
class AppRouter extends _i10.RootStackRouter {
|
||||
AppRouter([_i11.GlobalKey<_i11.NavigatorState>? navigatorKey])
|
||||
class AppRouter extends _i15.RootStackRouter {
|
||||
AppRouter([_i16.GlobalKey<_i16.NavigatorState>? navigatorKey])
|
||||
: super(navigatorKey);
|
||||
|
||||
@override
|
||||
final Map<String, _i10.PageFactory> pagesMap = {
|
||||
final Map<String, _i15.PageFactory> pagesMap = {
|
||||
MainLayout.name: (routeData) {
|
||||
return _i10.MaterialPageX<dynamic>(
|
||||
return _i15.MaterialPageX<dynamic>(
|
||||
routeData: routeData, child: const _i1.MainLayout());
|
||||
},
|
||||
HomePageRouter.name: (routeData) {
|
||||
return _i10.MaterialPageX<dynamic>(
|
||||
return _i15.MaterialPageX<dynamic>(
|
||||
routeData: routeData, child: const _i2.HomeScreen());
|
||||
},
|
||||
MapRoute.name: (routeData) {
|
||||
return _i10.MaterialPageX<dynamic>(
|
||||
return _i15.MaterialPageX<dynamic>(
|
||||
routeData: routeData, child: const _i3.MapScreen());
|
||||
},
|
||||
EventsRoute.name: (routeData) {
|
||||
return _i10.MaterialPageX<dynamic>(
|
||||
return _i15.MaterialPageX<dynamic>(
|
||||
routeData: routeData, child: const _i4.EventsScreen());
|
||||
},
|
||||
InfoRoute.name: (routeData) {
|
||||
return _i10.MaterialPageX<dynamic>(
|
||||
routeData: routeData, child: const _i5.InfoScreen());
|
||||
InfoPageRouter.name: (routeData) {
|
||||
return _i15.MaterialPageX<dynamic>(
|
||||
routeData: routeData, child: const _i5.HeroEmptyRouterPage());
|
||||
},
|
||||
HomeRoute.name: (routeData) {
|
||||
return _i10.CustomPage<dynamic>(
|
||||
return _i15.CustomPage<dynamic>(
|
||||
routeData: routeData,
|
||||
child: const _i6.HomePageHeader(),
|
||||
transitionsBuilder: _i10.TransitionsBuilders.fadeIn,
|
||||
transitionsBuilder: _i15.TransitionsBuilders.fadeIn,
|
||||
opaque: true,
|
||||
barrierDismissible: false);
|
||||
},
|
||||
StudentIdRoute.name: (routeData) {
|
||||
return _i10.CustomPage<dynamic>(
|
||||
return _i15.CustomPage<dynamic>(
|
||||
routeData: routeData,
|
||||
child: const _i7.StudentIdScreen(),
|
||||
transitionsBuilder: _i10.TransitionsBuilders.fadeIn,
|
||||
transitionsBuilder: _i15.TransitionsBuilders.fadeIn,
|
||||
opaque: true,
|
||||
barrierDismissible: false);
|
||||
},
|
||||
MapHomeRoute.name: (routeData) {
|
||||
return _i10.CustomPage<dynamic>(
|
||||
return _i15.CustomPage<dynamic>(
|
||||
routeData: routeData,
|
||||
child: const _i8.MapHomeScreen(),
|
||||
customRouteBuilder: _i12.mapRouteBuilder,
|
||||
customRouteBuilder: _i17.mapRouteBuilder,
|
||||
opaque: true,
|
||||
barrierDismissible: false);
|
||||
},
|
||||
MapCategoryRoute.name: (routeData) {
|
||||
final args = routeData.argsAs<MapCategoryRouteArgs>();
|
||||
return _i10.CustomPage<dynamic>(
|
||||
return _i15.CustomPage<dynamic>(
|
||||
routeData: routeData,
|
||||
child: _i9.MapCategoryScreen(category: args.category, key: args.key),
|
||||
customRouteBuilder: _i12.mapRouteBuilder,
|
||||
customRouteBuilder: _i17.mapRouteBuilder,
|
||||
opaque: true,
|
||||
barrierDismissible: false);
|
||||
},
|
||||
InfoRoute.name: (routeData) {
|
||||
return _i15.MaterialPageX<dynamic>(
|
||||
routeData: routeData, child: const _i10.InfoScreen());
|
||||
},
|
||||
HealthSafetyRoute.name: (routeData) {
|
||||
return _i15.MaterialPageX<dynamic>(
|
||||
routeData: routeData, child: const _i11.HealthSafetyScreen());
|
||||
},
|
||||
ContactsRoute.name: (routeData) {
|
||||
return _i15.MaterialPageX<dynamic>(
|
||||
routeData: routeData, child: const _i12.ContactsScreen());
|
||||
},
|
||||
HoursRoute.name: (routeData) {
|
||||
return _i15.MaterialPageX<dynamic>(
|
||||
routeData: routeData, child: const _i13.HoursScreen());
|
||||
},
|
||||
SettingsRoute.name: (routeData) {
|
||||
return _i15.MaterialPageX<dynamic>(
|
||||
routeData: routeData, child: const _i14.SettingsScreen());
|
||||
}
|
||||
};
|
||||
|
||||
@override
|
||||
List<_i10.RouteConfig> get routes => [
|
||||
_i10.RouteConfig(MainLayout.name, path: '/', children: [
|
||||
_i10.RouteConfig(HomePageRouter.name,
|
||||
List<_i15.RouteConfig> get routes => [
|
||||
_i15.RouteConfig(MainLayout.name, path: '/', children: [
|
||||
_i15.RouteConfig(HomePageRouter.name,
|
||||
path: 'home',
|
||||
parent: MainLayout.name,
|
||||
children: [
|
||||
_i10.RouteConfig(HomeRoute.name,
|
||||
_i15.RouteConfig(HomeRoute.name,
|
||||
path: '', parent: HomePageRouter.name),
|
||||
_i10.RouteConfig(StudentIdRoute.name,
|
||||
_i15.RouteConfig(StudentIdRoute.name,
|
||||
path: 'student-id', parent: HomePageRouter.name)
|
||||
]),
|
||||
_i10.RouteConfig(MapRoute.name,
|
||||
_i15.RouteConfig(MapRoute.name,
|
||||
path: 'map',
|
||||
parent: MainLayout.name,
|
||||
children: [
|
||||
_i10.RouteConfig(MapHomeRoute.name,
|
||||
_i15.RouteConfig(MapHomeRoute.name,
|
||||
path: '', parent: MapRoute.name),
|
||||
_i10.RouteConfig(MapCategoryRoute.name,
|
||||
_i15.RouteConfig(MapCategoryRoute.name,
|
||||
path: 'category/:id', parent: MapRoute.name)
|
||||
]),
|
||||
_i10.RouteConfig(EventsRoute.name,
|
||||
_i15.RouteConfig(EventsRoute.name,
|
||||
path: 'events', parent: MainLayout.name),
|
||||
_i10.RouteConfig(InfoRoute.name,
|
||||
path: 'info', parent: MainLayout.name)
|
||||
_i15.RouteConfig(InfoPageRouter.name,
|
||||
path: 'info',
|
||||
parent: MainLayout.name,
|
||||
children: [
|
||||
_i15.RouteConfig(InfoRoute.name,
|
||||
path: '', parent: InfoPageRouter.name),
|
||||
_i15.RouteConfig(HealthSafetyRoute.name,
|
||||
path: 'health-and-safety', parent: InfoPageRouter.name),
|
||||
_i15.RouteConfig(ContactsRoute.name,
|
||||
path: 'contacts', parent: InfoPageRouter.name),
|
||||
_i15.RouteConfig(HoursRoute.name,
|
||||
path: 'hours', parent: InfoPageRouter.name),
|
||||
_i15.RouteConfig(SettingsRoute.name,
|
||||
path: 'settings', parent: InfoPageRouter.name)
|
||||
])
|
||||
])
|
||||
];
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i1.MainLayout]
|
||||
class MainLayout extends _i10.PageRouteInfo<void> {
|
||||
const MainLayout({List<_i10.PageRouteInfo>? children})
|
||||
class MainLayout extends _i15.PageRouteInfo<void> {
|
||||
const MainLayout({List<_i15.PageRouteInfo>? children})
|
||||
: super(MainLayout.name, path: '/', initialChildren: children);
|
||||
|
||||
static const String name = 'MainLayout';
|
||||
@@ -127,8 +165,8 @@ class MainLayout extends _i10.PageRouteInfo<void> {
|
||||
|
||||
/// generated route for
|
||||
/// [_i2.HomeScreen]
|
||||
class HomePageRouter extends _i10.PageRouteInfo<void> {
|
||||
const HomePageRouter({List<_i10.PageRouteInfo>? children})
|
||||
class HomePageRouter extends _i15.PageRouteInfo<void> {
|
||||
const HomePageRouter({List<_i15.PageRouteInfo>? children})
|
||||
: super(HomePageRouter.name, path: 'home', initialChildren: children);
|
||||
|
||||
static const String name = 'HomePageRouter';
|
||||
@@ -136,8 +174,8 @@ class HomePageRouter extends _i10.PageRouteInfo<void> {
|
||||
|
||||
/// generated route for
|
||||
/// [_i3.MapScreen]
|
||||
class MapRoute extends _i10.PageRouteInfo<void> {
|
||||
const MapRoute({List<_i10.PageRouteInfo>? children})
|
||||
class MapRoute extends _i15.PageRouteInfo<void> {
|
||||
const MapRoute({List<_i15.PageRouteInfo>? children})
|
||||
: super(MapRoute.name, path: 'map', initialChildren: children);
|
||||
|
||||
static const String name = 'MapRoute';
|
||||
@@ -145,23 +183,24 @@ class MapRoute extends _i10.PageRouteInfo<void> {
|
||||
|
||||
/// generated route for
|
||||
/// [_i4.EventsScreen]
|
||||
class EventsRoute extends _i10.PageRouteInfo<void> {
|
||||
class EventsRoute extends _i15.PageRouteInfo<void> {
|
||||
const EventsRoute() : super(EventsRoute.name, path: 'events');
|
||||
|
||||
static const String name = 'EventsRoute';
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i5.InfoScreen]
|
||||
class InfoRoute extends _i10.PageRouteInfo<void> {
|
||||
const InfoRoute() : super(InfoRoute.name, path: 'info');
|
||||
/// [_i5.HeroEmptyRouterPage]
|
||||
class InfoPageRouter extends _i15.PageRouteInfo<void> {
|
||||
const InfoPageRouter({List<_i15.PageRouteInfo>? children})
|
||||
: super(InfoPageRouter.name, path: 'info', initialChildren: children);
|
||||
|
||||
static const String name = 'InfoRoute';
|
||||
static const String name = 'InfoPageRouter';
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i6.HomePageHeader]
|
||||
class HomeRoute extends _i10.PageRouteInfo<void> {
|
||||
class HomeRoute extends _i15.PageRouteInfo<void> {
|
||||
const HomeRoute() : super(HomeRoute.name, path: '');
|
||||
|
||||
static const String name = 'HomeRoute';
|
||||
@@ -169,7 +208,7 @@ class HomeRoute extends _i10.PageRouteInfo<void> {
|
||||
|
||||
/// generated route for
|
||||
/// [_i7.StudentIdScreen]
|
||||
class StudentIdRoute extends _i10.PageRouteInfo<void> {
|
||||
class StudentIdRoute extends _i15.PageRouteInfo<void> {
|
||||
const StudentIdRoute() : super(StudentIdRoute.name, path: 'student-id');
|
||||
|
||||
static const String name = 'StudentIdRoute';
|
||||
@@ -177,7 +216,7 @@ class StudentIdRoute extends _i10.PageRouteInfo<void> {
|
||||
|
||||
/// generated route for
|
||||
/// [_i8.MapHomeScreen]
|
||||
class MapHomeRoute extends _i10.PageRouteInfo<void> {
|
||||
class MapHomeRoute extends _i15.PageRouteInfo<void> {
|
||||
const MapHomeRoute() : super(MapHomeRoute.name, path: '');
|
||||
|
||||
static const String name = 'MapHomeRoute';
|
||||
@@ -185,8 +224,8 @@ class MapHomeRoute extends _i10.PageRouteInfo<void> {
|
||||
|
||||
/// generated route for
|
||||
/// [_i9.MapCategoryScreen]
|
||||
class MapCategoryRoute extends _i10.PageRouteInfo<MapCategoryRouteArgs> {
|
||||
MapCategoryRoute({required _i13.MapCategory category, _i11.Key? key})
|
||||
class MapCategoryRoute extends _i15.PageRouteInfo<MapCategoryRouteArgs> {
|
||||
MapCategoryRoute({required _i18.MapCategory category, _i16.Key? key})
|
||||
: super(MapCategoryRoute.name,
|
||||
path: 'category/:id',
|
||||
args: MapCategoryRouteArgs(category: category, key: key));
|
||||
@@ -197,12 +236,53 @@ class MapCategoryRoute extends _i10.PageRouteInfo<MapCategoryRouteArgs> {
|
||||
class MapCategoryRouteArgs {
|
||||
const MapCategoryRouteArgs({required this.category, this.key});
|
||||
|
||||
final _i13.MapCategory category;
|
||||
final _i18.MapCategory category;
|
||||
|
||||
final _i11.Key? key;
|
||||
final _i16.Key? key;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'MapCategoryRouteArgs{category: $category, key: $key}';
|
||||
}
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i10.InfoScreen]
|
||||
class InfoRoute extends _i15.PageRouteInfo<void> {
|
||||
const InfoRoute() : super(InfoRoute.name, path: '');
|
||||
|
||||
static const String name = 'InfoRoute';
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i11.HealthSafetyScreen]
|
||||
class HealthSafetyRoute extends _i15.PageRouteInfo<void> {
|
||||
const HealthSafetyRoute()
|
||||
: super(HealthSafetyRoute.name, path: 'health-and-safety');
|
||||
|
||||
static const String name = 'HealthSafetyRoute';
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i12.ContactsScreen]
|
||||
class ContactsRoute extends _i15.PageRouteInfo<void> {
|
||||
const ContactsRoute() : super(ContactsRoute.name, path: 'contacts');
|
||||
|
||||
static const String name = 'ContactsRoute';
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i13.HoursScreen]
|
||||
class HoursRoute extends _i15.PageRouteInfo<void> {
|
||||
const HoursRoute() : super(HoursRoute.name, path: 'hours');
|
||||
|
||||
static const String name = 'HoursRoute';
|
||||
}
|
||||
|
||||
/// generated route for
|
||||
/// [_i14.SettingsScreen]
|
||||
class SettingsRoute extends _i15.PageRouteInfo<void> {
|
||||
const SettingsRoute() : super(SettingsRoute.name, path: 'settings');
|
||||
|
||||
static const String name = 'SettingsRoute';
|
||||
}
|
||||
|
Reference in New Issue
Block a user