public override Widget build(BuildContext context) { return(new StoreConnector <AppState, FeedbackScreenViewModel>( converter: state => new FeedbackScreenViewModel { feedbackType = state.feedbackState.feedbackType, loading = state.feedbackState.loading }, builder: (context1, viewModel, dispatcher) => { var actionModel = new FeedbackScreenActionModel { mainRouterPop = () => dispatcher.dispatch(new MainNavigatorPopAction()), pushToFeedbackType = () => dispatcher.dispatch(new MainNavigatorPushToAction { routeName = MainNavigatorRoutes.FeedbackType }), changeFeedbackType = type => { dispatcher.dispatch(new ChangeFeedbackTypeAction { type = type }); }, startFeedback = () => dispatcher.dispatch(new StartFeedbackAction()), sendFeedbak = (content, name, contact) => dispatcher.dispatch <IPromise>(Actions.feedback(viewModel.feedbackType, content, name, contact)) }; return new FeedbackScreen(viewModel: viewModel, actionModel: actionModel); } )); }
public FeedbackScreen( FeedbackScreenViewModel viewModel = null, FeedbackScreenActionModel actionModel = null, Key key = null ) : base(key: key) { this.viewModel = viewModel; this.actionModel = actionModel; }