237 lines
6.6 KiB
Dart
237 lines
6.6 KiB
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
// **************************************************************************
|
|
// StackedNavigatorGenerator
|
|
// **************************************************************************
|
|
|
|
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
|
import 'package:bahla_front/ui/views/event_details/event_details_view.dart'
|
|
as _i5;
|
|
import 'package:bahla_front/ui/views/home/home_view.dart' as _i2;
|
|
import 'package:bahla_front/ui/views/main/main_view.dart' as _i4;
|
|
import 'package:bahla_front/ui/views/startup/startup_view.dart' as _i3;
|
|
import 'package:flutter/material.dart' as _i6;
|
|
import 'package:flutter/material.dart';
|
|
import 'package:stacked/stacked.dart' as _i1;
|
|
import 'package:stacked_services/stacked_services.dart' as _i7;
|
|
|
|
class Routes {
|
|
static const startupView = '/startup-view';
|
|
|
|
static const mainView = '/main-view';
|
|
|
|
static const homeView = '/home-view';
|
|
|
|
static const eventDetailsView = '/event-details-view';
|
|
|
|
static const all = <String>{
|
|
homeView,
|
|
startupView,
|
|
mainView,
|
|
eventDetailsView,
|
|
};
|
|
}
|
|
|
|
class StackedRouter extends _i1.RouterBase {
|
|
final _routes = <_i1.RouteDef>[
|
|
_i1.RouteDef(
|
|
Routes.startupView,
|
|
page: _i3.StartupView,
|
|
),
|
|
_i1.RouteDef(
|
|
Routes.mainView,
|
|
page: _i4.MainView,
|
|
),
|
|
_i1.RouteDef(
|
|
Routes.homeView,
|
|
page: _i2.HomeView,
|
|
),
|
|
_i1.RouteDef(
|
|
Routes.eventDetailsView,
|
|
page: _i5.EventDetailsView,
|
|
),
|
|
];
|
|
|
|
final _pagesMap = <Type, _i1.StackedRouteFactory>{
|
|
_i2.HomeView: (data) {
|
|
return _i6.MaterialPageRoute<dynamic>(
|
|
builder: (context) => const _i2.HomeView(),
|
|
settings: data,
|
|
);
|
|
},
|
|
_i3.StartupView: (data) {
|
|
return _i6.MaterialPageRoute<dynamic>(
|
|
builder: (context) => const _i3.StartupView(),
|
|
settings: data,
|
|
);
|
|
},
|
|
_i4.MainView: (data) {
|
|
return _i6.MaterialPageRoute<dynamic>(
|
|
builder: (context) => const _i4.MainView(),
|
|
settings: data,
|
|
);
|
|
},
|
|
_i5.EventDetailsView: (data) {
|
|
final args = data.getArgs<EventDetailsViewArguments>(nullOk: false);
|
|
return _i6.MaterialPageRoute<dynamic>(
|
|
builder: (context) =>
|
|
_i5.EventDetailsView(key: args.key, eventId: args.eventId),
|
|
settings: data,
|
|
);
|
|
},
|
|
};
|
|
|
|
@override
|
|
List<_i1.RouteDef> get routes => _routes;
|
|
|
|
@override
|
|
Map<Type, _i1.StackedRouteFactory> get pagesMap => _pagesMap;
|
|
}
|
|
|
|
class EventDetailsViewArguments {
|
|
const EventDetailsViewArguments({
|
|
this.key,
|
|
required this.eventId,
|
|
});
|
|
|
|
final _i6.Key? key;
|
|
|
|
final int eventId;
|
|
|
|
@override
|
|
String toString() {
|
|
return '{"key": "$key", "eventId": "$eventId"}';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(covariant EventDetailsViewArguments other) {
|
|
if (identical(this, other)) return true;
|
|
return other.key == key && other.eventId == eventId;
|
|
}
|
|
|
|
@override
|
|
int get hashCode {
|
|
return key.hashCode ^ eventId.hashCode;
|
|
}
|
|
}
|
|
|
|
extension NavigatorStateExtension on _i7.NavigationService {
|
|
Future<dynamic> navigateToStartupView([
|
|
int? routerId,
|
|
bool preventDuplicates = true,
|
|
Map<String, String>? parameters,
|
|
Widget Function(BuildContext, Animation<double>, Animation<double>, Widget)?
|
|
transition,
|
|
]) async {
|
|
return navigateTo<dynamic>(Routes.startupView,
|
|
id: routerId,
|
|
preventDuplicates: preventDuplicates,
|
|
parameters: parameters,
|
|
transition: transition);
|
|
}
|
|
|
|
Future<dynamic> navigateToMainView([
|
|
int? routerId,
|
|
bool preventDuplicates = true,
|
|
Map<String, String>? parameters,
|
|
Widget Function(BuildContext, Animation<double>, Animation<double>, Widget)?
|
|
transition,
|
|
]) async {
|
|
return navigateTo<dynamic>(Routes.mainView,
|
|
id: routerId,
|
|
preventDuplicates: preventDuplicates,
|
|
parameters: parameters,
|
|
transition: transition);
|
|
}
|
|
|
|
Future<dynamic> navigateToHomeView([
|
|
int? routerId,
|
|
bool preventDuplicates = true,
|
|
Map<String, String>? parameters,
|
|
Widget Function(BuildContext, Animation<double>, Animation<double>, Widget)?
|
|
transition,
|
|
]) async {
|
|
return navigateTo<dynamic>(Routes.homeView,
|
|
id: routerId,
|
|
preventDuplicates: preventDuplicates,
|
|
parameters: parameters,
|
|
transition: transition);
|
|
}
|
|
|
|
Future<dynamic> navigateToEventDetailsView({
|
|
_i6.Key? key,
|
|
required int eventId,
|
|
int? routerId,
|
|
bool preventDuplicates = true,
|
|
Map<String, String>? parameters,
|
|
Widget Function(BuildContext, Animation<double>, Animation<double>, Widget)?
|
|
transition,
|
|
}) async {
|
|
return navigateTo<dynamic>(Routes.eventDetailsView,
|
|
arguments: EventDetailsViewArguments(key: key, eventId: eventId),
|
|
id: routerId,
|
|
preventDuplicates: preventDuplicates,
|
|
parameters: parameters,
|
|
transition: transition);
|
|
}
|
|
|
|
Future<dynamic> replaceWithStartupView([
|
|
int? routerId,
|
|
bool preventDuplicates = true,
|
|
Map<String, String>? parameters,
|
|
Widget Function(BuildContext, Animation<double>, Animation<double>, Widget)?
|
|
transition,
|
|
]) async {
|
|
return replaceWith<dynamic>(Routes.startupView,
|
|
id: routerId,
|
|
preventDuplicates: preventDuplicates,
|
|
parameters: parameters,
|
|
transition: transition);
|
|
}
|
|
|
|
Future<dynamic> replaceWithMainView([
|
|
int? routerId,
|
|
bool preventDuplicates = true,
|
|
Map<String, String>? parameters,
|
|
Widget Function(BuildContext, Animation<double>, Animation<double>, Widget)?
|
|
transition,
|
|
]) async {
|
|
return replaceWith<dynamic>(Routes.mainView,
|
|
id: routerId,
|
|
preventDuplicates: preventDuplicates,
|
|
parameters: parameters,
|
|
transition: transition);
|
|
}
|
|
|
|
Future<dynamic> replaceWithHomeView([
|
|
int? routerId,
|
|
bool preventDuplicates = true,
|
|
Map<String, String>? parameters,
|
|
Widget Function(BuildContext, Animation<double>, Animation<double>, Widget)?
|
|
transition,
|
|
]) async {
|
|
return replaceWith<dynamic>(Routes.homeView,
|
|
id: routerId,
|
|
preventDuplicates: preventDuplicates,
|
|
parameters: parameters,
|
|
transition: transition);
|
|
}
|
|
|
|
Future<dynamic> replaceWithEventDetailsView({
|
|
_i6.Key? key,
|
|
required int eventId,
|
|
int? routerId,
|
|
bool preventDuplicates = true,
|
|
Map<String, String>? parameters,
|
|
Widget Function(BuildContext, Animation<double>, Animation<double>, Widget)?
|
|
transition,
|
|
}) async {
|
|
return replaceWith<dynamic>(Routes.eventDetailsView,
|
|
arguments: EventDetailsViewArguments(key: key, eventId: eventId),
|
|
id: routerId,
|
|
preventDuplicates: preventDuplicates,
|
|
parameters: parameters,
|
|
transition: transition);
|
|
}
|
|
}
|