// GENERATED CODE - DO NOT MODIFY BY HAND // dart format width=80 // ************************************************************************** // 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 homeView = '/home-view'; static const startupView = '/startup-view'; static const mainView = '/main-view'; static const eventDetailsView = '/event-details-view'; static const all = { homeView, startupView, mainView, eventDetailsView, }; } class StackedRouter extends _i1.RouterBase { final _routes = <_i1.RouteDef>[ _i1.RouteDef( Routes.homeView, page: _i2.HomeView, ), _i1.RouteDef( Routes.startupView, page: _i3.StartupView, ), _i1.RouteDef( Routes.mainView, page: _i4.MainView, ), _i1.RouteDef( Routes.eventDetailsView, page: _i5.EventDetailsView, ), ]; final _pagesMap = { _i2.HomeView: (data) { final args = data.getArgs( orElse: () => const HomeViewArguments(), ); return _i6.MaterialPageRoute( builder: (context) => _i2.HomeView(key: args.key), settings: data, ); }, _i3.StartupView: (data) { final args = data.getArgs( orElse: () => const StartupViewArguments(), ); return _i6.MaterialPageRoute( builder: (context) => _i3.StartupView(key: args.key), settings: data, ); }, _i4.MainView: (data) { final args = data.getArgs( orElse: () => const MainViewArguments(), ); return _i6.MaterialPageRoute( builder: (context) => _i4.MainView(key: args.key), settings: data, ); }, _i5.EventDetailsView: (data) { final args = data.getArgs(nullOk: false); return _i6.MaterialPageRoute( builder: (context) => _i5.EventDetailsView(key: args.key, eventId: args.eventId), settings: data, ); }, }; @override List<_i1.RouteDef> get routes => _routes; @override Map get pagesMap => _pagesMap; } class HomeViewArguments { const HomeViewArguments({this.key}); final _i6.Key? key; @override String toString() { return '{"key": "$key"}'; } @override bool operator ==(covariant HomeViewArguments other) { if (identical(this, other)) return true; return other.key == key; } @override int get hashCode { return key.hashCode; } } class StartupViewArguments { const StartupViewArguments({this.key}); final _i6.Key? key; @override String toString() { return '{"key": "$key"}'; } @override bool operator ==(covariant StartupViewArguments other) { if (identical(this, other)) return true; return other.key == key; } @override int get hashCode { return key.hashCode; } } class MainViewArguments { const MainViewArguments({this.key}); final _i6.Key? key; @override String toString() { return '{"key": "$key"}'; } @override bool operator ==(covariant MainViewArguments other) { if (identical(this, other)) return true; return other.key == key; } @override int get hashCode { return key.hashCode; } } 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 navigateToHomeView({ _i6.Key? key, int? routerId, bool preventDuplicates = true, Map? parameters, Widget Function(BuildContext, Animation, Animation, Widget)? transition, }) async { return navigateTo(Routes.homeView, arguments: HomeViewArguments(key: key), id: routerId, preventDuplicates: preventDuplicates, parameters: parameters, transition: transition); } Future navigateToStartupView({ _i6.Key? key, int? routerId, bool preventDuplicates = true, Map? parameters, Widget Function(BuildContext, Animation, Animation, Widget)? transition, }) async { return navigateTo(Routes.startupView, arguments: StartupViewArguments(key: key), id: routerId, preventDuplicates: preventDuplicates, parameters: parameters, transition: transition); } Future navigateToMainView({ _i6.Key? key, int? routerId, bool preventDuplicates = true, Map? parameters, Widget Function(BuildContext, Animation, Animation, Widget)? transition, }) async { return navigateTo(Routes.mainView, arguments: MainViewArguments(key: key), id: routerId, preventDuplicates: preventDuplicates, parameters: parameters, transition: transition); } Future navigateToEventDetailsView({ _i6.Key? key, required int eventId, int? routerId, bool preventDuplicates = true, Map? parameters, Widget Function(BuildContext, Animation, Animation, Widget)? transition, }) async { return navigateTo(Routes.eventDetailsView, arguments: EventDetailsViewArguments(key: key, eventId: eventId), id: routerId, preventDuplicates: preventDuplicates, parameters: parameters, transition: transition); } Future replaceWithHomeView({ _i6.Key? key, int? routerId, bool preventDuplicates = true, Map? parameters, Widget Function(BuildContext, Animation, Animation, Widget)? transition, }) async { return replaceWith(Routes.homeView, arguments: HomeViewArguments(key: key), id: routerId, preventDuplicates: preventDuplicates, parameters: parameters, transition: transition); } Future replaceWithStartupView({ _i6.Key? key, int? routerId, bool preventDuplicates = true, Map? parameters, Widget Function(BuildContext, Animation, Animation, Widget)? transition, }) async { return replaceWith(Routes.startupView, arguments: StartupViewArguments(key: key), id: routerId, preventDuplicates: preventDuplicates, parameters: parameters, transition: transition); } Future replaceWithMainView({ _i6.Key? key, int? routerId, bool preventDuplicates = true, Map? parameters, Widget Function(BuildContext, Animation, Animation, Widget)? transition, }) async { return replaceWith(Routes.mainView, arguments: MainViewArguments(key: key), id: routerId, preventDuplicates: preventDuplicates, parameters: parameters, transition: transition); } Future replaceWithEventDetailsView({ _i6.Key? key, required int eventId, int? routerId, bool preventDuplicates = true, Map? parameters, Widget Function(BuildContext, Animation, Animation, Widget)? transition, }) async { return replaceWith(Routes.eventDetailsView, arguments: EventDetailsViewArguments(key: key, eventId: eventId), id: routerId, preventDuplicates: preventDuplicates, parameters: parameters, transition: transition); } }