Ejemplo n.º 1
0
 public override Widget build(BuildContext context)
 {
     return(new StoreConnector <AppState, EventsScreenViewModel>(
                converter: state => new EventsScreenViewModel {
         eventOngoingLoading = state.eventState.eventsOngoingLoading,
         ongoingEvents = state.eventState.ongoingEvents,
         ongoingEventTotal = state.eventState.ongoingEventTotal,
         eventsDict = state.eventState.eventsDict,
         placeDict = state.placeState.placeDict
     },
                builder: (context1, viewModel, dispatcher) => {
         var actionModel = new EventsScreenActionModel {
             pushToEventDetail = (eventId, eventType) => dispatcher.dispatch(
                 new MainNavigatorPushToEventDetailAction {
                 eventId = eventId, eventType = eventType
             }),
             clearEventOngoing = () => dispatcher.dispatch(new ClearEventOngoingAction()),
             startFetchEventOngoing = () => dispatcher.dispatch(new StartFetchEventOngoingAction()),
             fetchEvents = (pageNumber, tab) =>
                           dispatcher.dispatch <IPromise>(Actions.fetchEvents(pageNumber: pageNumber, tab: tab, mode: this.mode))
         };
         return new EventOngoingScreen(viewModel: viewModel, actionModel: actionModel, mode: this.mode);
     }
                ));
 }
Ejemplo n.º 2
0
 public override Widget build(BuildContext context)
 {
     return(new StoreConnector <AppState, EventsScreenViewModel>(
                converter: state => new EventsScreenViewModel {
         homeEventLoading = state.eventState.homeEventsLoading,
         homeEvents = state.eventState.homeEvents,
         homeEventHasMore = state.eventState.homeEventHasMore,
         homeEventPageNumber = state.eventState.homeEventPageNumber,
         eventsDict = state.eventState.eventsDict,
         placeDict = state.placeState.placeDict
     },
                builder: (context1, viewModel, dispatcher) => {
         var actionModel = new EventsScreenActionModel {
             mainRouterPop = () => dispatcher.dispatch(new MainNavigatorPopAction()),
             pushToEventDetail = (eventId, eventType) => dispatcher.dispatch(
                 new MainNavigatorPushToEventDetailAction {
                 eventId = eventId, eventType = eventType
             }),
             startFetchHomeEvent = () => dispatcher.dispatch(new StartFetchHomeEventsAction()),
             fetchHomeEvents = page => dispatcher.dispatch <IPromise>(Actions.fetchHomeEvents(page: page))
         };
         return new HomeEventsScreen(viewModel: viewModel, actionModel: actionModel);
     }
                ));
 }
 public EventCompletedScreen(
     EventsScreenViewModel viewModel     = null,
     EventsScreenActionModel actionModel = null,
     Key key = null
     ) : base(key: key)
 {
     this.viewModel   = viewModel;
     this.actionModel = actionModel;
 }
Ejemplo n.º 4
0
 public EventOngoingScreen(
     EventsScreenViewModel viewModel     = null,
     EventsScreenActionModel actionModel = null,
     Key key = null
     ) : base(key)
 {
     this.viewModel   = viewModel;
     this.actionModel = actionModel;
 }
Ejemplo n.º 5
0
 public override Widget build(BuildContext context)
 {
     return(new StoreConnector <AppState, EventsScreenViewModel>(
                converter: state => new EventsScreenViewModel {
         eventCompletedLoading = state.eventState.eventsCompletedLoading,
         completedEvents = state.eventState.completedEvents,
         completedEventTotal = state.eventState.completedEventTotal,
         eventsDict = state.eventState.eventsDict,
         placeDict = state.placeState.placeDict
     },
                builder: (context1, viewModel, dispatcher) => {
         var actionModel = new EventsScreenActionModel {
             pushToEventDetail = (eventId, eventType) => dispatcher.dispatch(
                 new MainNavigatorPushToEventDetailAction {
                 eventId = eventId, eventType = eventType
             }),
             startFetchEventCompleted = () => dispatcher.dispatch(new StartFetchEventCompletedAction()),
             fetchEvents = (pageNumber, tab) =>
                           dispatcher.dispatch <IPromise>(Actions.fetchEvents(pageNumber, tab))
         };
         return new EventCompletedScreen(viewModel, actionModel);
     }
                ));
 }