Skip to content

Instantly share code, notes, and snippets.

@mondoktamas
Created December 1, 2021 13:05
Show Gist options
  • Save mondoktamas/f532a1758de0a417e9372b79be2c2678 to your computer and use it in GitHub Desktop.
Save mondoktamas/f532a1758de0a417e9372b79be2c2678 to your computer and use it in GitHub Desktop.
import 'package:auto_route/auto_route.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:skogluft/application/di/injection.dart';
import 'package:skogluft/application/features/unauthorized/features/instructions/presentation/bloc/instructions_bloc.dart';
import 'package:skogluft/application/features/unauthorized/features/signin/presentation/bloc/sign_in_bloc.dart';
import 'package:skogluft/application/features/unauthorized/features/signup/presentation/bloc/sign_up_bloc.dart';
import 'package:skogluft/application/features/unauthorized/features/start/presentation/bloc/start_page_bloc.dart';
class UnauthorizedWrapperPage extends StatelessWidget {
const UnauthorizedWrapperPage({final Key? key}) : super(key: key);
@override
Widget build(final BuildContext context) => MultiBlocProvider(
providers: [
BlocProvider<SignInBloc>(
create: (_) => getIt<SignInBloc>(),
),
BlocProvider<SignUpBloc>(
create: (_) => getIt<SignUpBloc>(),
),
BlocProvider<StartPageBloc>(
create: (_) => getIt<StartPageBloc>(),
),
BlocProvider<InstructionsBloc>(
create: (_) => getIt<InstructionsBloc>(),
),
],
child: const AutoRouter(),
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment