diff --git a/lib/main.dart b/lib/main.dart index ebe22899..b907ba66 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -44,52 +44,39 @@ class MyApp extends StatelessWidget { return MultiBlocProvider( providers: [ BlocProvider(create: (context) => sl()..runInitialization()), - BlocProvider( - create: (context) => ThemeBloc(ThemeState(themeType: PrefUtils().getThemeData())), - ), - BlocProvider( - create: (context) => MyProfileBloc(MyProfileState(myProfileModelObj: MyProfileModel()))..add(MyProfileInitialEvent()), - ), - BlocProvider( - create: (context) => FeedBloc(FeedState(myProfileModelObj: FeedModel()))..add(FeedInitialEvent()), - ), - BlocProvider( - create: (context) => DiaryEditBloc(DiaryEditState(diaryEditModelObj: DiaryEditModel()))..add(DiaryEditInitialEvent()), - ), - BlocProvider( - create: (context) => ChatSelectBloc(ChatSelectState(chatSelectModelObj: ChatSelectModel()))..add(ChatSelectInitialEvent()), - ), + BlocProvider(create: (context) => ThemeBloc(ThemeState(themeType: PrefUtils().getThemeData()))), + BlocProvider(create: (context) => MyProfileBloc(MyProfileState(myProfileModelObj: MyProfileModel()))..add(MyProfileInitialEvent())), + BlocProvider(create: (context) => FeedBloc(FeedState(myProfileModelObj: FeedModel()))..add(FeedInitialEvent())), + BlocProvider(create: (context) => DiaryEditBloc(DiaryEditState(diaryEditModelObj: DiaryEditModel()))..add(DiaryEditInitialEvent())), + BlocProvider(create: (context) => ChatSelectBloc(ChatSelectState(chatSelectModelObj: ChatSelectModel()))..add(ChatSelectInitialEvent())) ], - child: BlocListener( - listener: (BuildContext context, InitializationState state) { }, - child: BlocBuilder( - builder: (context, state) { - return KeyboardDismisser( - gestures: [ - GestureType.onTap, - GestureType.onPanUpdateDownDirection, + child: BlocBuilder( + builder: (context, state) { + return KeyboardDismisser( + gestures: [ + GestureType.onTap, + GestureType.onPanUpdateDownDirection, + ], + child: MaterialApp.router( + theme: theme, + title: 'Eatvio', + routerConfig: AppRouter.appRouter, + debugShowCheckedModeBanner: false, + localizationsDelegates: [ + AppLocalizationDelegate(), + GlobalMaterialLocalizations.delegate, + GlobalWidgetsLocalizations.delegate, + GlobalCupertinoLocalizations.delegate, ], - child: MaterialApp.router( - theme: theme, - title: 'Eatvio', - routerConfig: AppRouter.appRouter, - debugShowCheckedModeBanner: false, - localizationsDelegates: [ - AppLocalizationDelegate(), - GlobalMaterialLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - GlobalCupertinoLocalizations.delegate, - ], - supportedLocales: [ - Locale( - 'ru', - '', - ), - ], - ), - ); - }, - ), + supportedLocales: [ + Locale( + 'ru', + '', + ), + ], + ), + ); + }, ), ); } diff --git a/pubspec.yaml b/pubspec.yaml index 17ba3aae..a3986dba 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -59,7 +59,9 @@ dependencies: # http request dio: ^5.4.3+1 # websocket - pusher_client: ^2.0.0 + pusher_client: + git: + url: https://github.com/bihim/pusher_client # photo gallery viewer + dismissible page photo_view: ^0.15.0 dismissible_page: ^1.0.2