SHARE
TWEET

Untitled

a guest Apr 20th, 2019 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Widget _handleHomeScreen(BuildContext context, ApplicationBloc bloc) {
  2.     return StreamBuilder<CurrentHome>(
  3.       stream: BlocProvider.of<ApplicationBloc>(context).currentHome,
  4.       initialData: CurrentHome.noPage,
  5.       builder: (BuildContext context, AsyncSnapshot<CurrentHome> snapshot) {
  6.         if (snapshot.hasData) {
  7.           if (snapshot.data == CurrentHome.introPage) {
  8.             return /*IntroPage();*/
  9.               CreateEvent(appRepository: _repository);
  10.           } else if (snapshot.data == CurrentHome.authPage) {
  11.             return /*BlocProvider<AuthBloc>(
  12.               bloc: AuthBloc(),
  13.               child: Authentication(),
  14.             );*/
  15.               CreateEvent(appRepository: _repository);
  16.           } else if (snapshot.data == CurrentHome.interestsPage) {
  17.             return /*BlocProvider<InterestsBloc>(
  18.               bloc: InterestsBloc(),
  19.               child: Interests(),
  20.             );*/
  21.               CreateEvent(appRepository: _repository);
  22.           }
  23.           else if(snapshot.data == CurrentHome.homePage)
  24.             {
  25.               return /*BlocProvider<HomeBloc>(
  26.                 bloc: HomeBloc(bloc),
  27.                 child: HomePage(),
  28.               );*/
  29.                 CreateEvent(appRepository: _repository);
  30.             }
  31.           else if (snapshot.data == CurrentHome.noPage) {
  32.             return /*Container();*/
  33.               CreateEvent(appRepository: _repository);
  34.           }
  35.         }
  36.       },
  37.     );
  38.   }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top