コード例 #1
0
 public override Widget build(BuildContext context)
 {
     base.build(context: context);
     return(new Container(
                padding: EdgeInsets.only(top: CCommonUtils.getSafeAreaTopPadding(context: context)),
                color: CColors.White,
                child: new Column(
                    children: new List <Widget> {
         new CustomNavigationBar(
             new Text("活动", style: CTextStyle.H2)
             ),
         new Expanded(
             child: new CustomSegmentedControl(
                 new List <object> {
             "即将开始", "往期活动"
         },
                 new List <Widget> {
             new EventOngoingScreenConnector(),
             new EventCompletedScreenConnector()
         },
                 newValue => AnalyticsManager.ClickEventSegment("Event",
                                                                0 == newValue ? "ongoing" : "completed"),
                 1
                 )
             )
     }
                    )
                ));
 }
コード例 #2
0
 public override Widget build(BuildContext context)
 {
     base.build(context: context);
     return(new Container(
                color: CColors.White,
                child: new Column(
                    children: new List <Widget> {
         new CustomNavigationBar(
             new Text("活动", style: CTextStyle.H2),
             null,
             backgroundColor: CColors.White,
             0
             ),
         new Expanded(
             child: new CustomSegmentedControl(
                 new List <string> {
             "即将开始", "往期活动"
         },
                 new List <Widget> {
             new EventOngoingScreenConnector(),
             new EventCompletedScreenConnector()
         },
                 newValue => AnalyticsManager.ClickEventSegment("Event", 0 == newValue ? "ongoing" : "completed"),
                 1
                 )
             )
     }
                    )
                ));
 }
コード例 #3
0
        public override Widget build(BuildContext context)
        {
            base.build(context: context);
            var mode = this._selectValue == "all" ? "" : this._selectValue;

            return(new Container(
                       padding: EdgeInsets.only(top: CCommonUtils.getSafeAreaTopPadding(context: context)),
                       color: CColors.White,
                       child: new Column(
                           children: new List <Widget> {
                new CustomNavigationBar(
                    new Text("活动", style: CTextStyle.H2)
                    ),
                new Expanded(
                    child: new CustomSegmentedControl(
                        new List <object> {
                    "即将开始", "往期活动"
                },
                        new List <Widget> {
                    new EventOngoingScreenConnector(mode: mode),
                    new EventCompletedScreenConnector(mode: mode)
                },
                        newValue => AnalyticsManager.ClickEventSegment("Event",
                                                                       0 == newValue ? "ongoing" : "completed"),
                        1,
                        trailing: new Container(
                            padding: EdgeInsets.only(right: 12),
                            child: new CustomDropdownButton <string>(
                                value: this._selectValue,
                                items: new List <CustomDropdownMenuItem <string> > {
                    new CustomDropdownMenuItem <string>(
                        value: "all",
                        child: new Text("全部")
                        ),
                    new CustomDropdownMenuItem <string>(
                        value: "online",
                        child: new Text("线上")
                        ),
                    new CustomDropdownMenuItem <string>(
                        value: "offline",
                        child: new Text("线下")
                        )
                },
                                onChanged: newValue => {
                    if (this._selectValue != newValue)
                    {
                        this.setState(() => this._selectValue = newValue);
                    }
                },
                                headerWidget: new Container(height: 6, color: CColors.White),
                                footerWidget: new Container(height: 6, color: CColors.White)
                                )
                            )
                        )
                    )
            }
                           )
                       ));
        }
コード例 #4
0
 static Widget _buildContentView()
 {
     return(new CustomSegmentedControl(
                new List <string> {
         "即将开始", "往期活动"
     },
                new List <Widget> {
         new MyFutureEventsScreenConnector(),
         new MyPastEventsScreenConnector()
     },
                newValue => AnalyticsManager.ClickEventSegment("MineEvent", 0 == newValue ? "ongoing" : "completed")
                ));
 }
コード例 #5
0
        Widget _buildContentView()
        {
            var mode = this._selectValue == "all" ? "" : this._selectValue;

            return(new CustomSegmentedControl(
                       new List <object> {
                "即将开始", "往期活动"
            },
                       new List <Widget> {
                new MyFutureEventsScreenConnector(mode: mode),
                new MyPastEventsScreenConnector(mode: mode)
            },
                       newValue => AnalyticsManager.ClickEventSegment(
                           "MineEvent", 0 == newValue ? "ongoing" : "completed"),
                       trailing: new Container(
                           padding: EdgeInsets.only(right: 12),
                           child: new CustomDropdownButton <string>(
                               value: this._selectValue,
                               items: new List <CustomDropdownMenuItem <string> > {
                new CustomDropdownMenuItem <string>(
                    value: "all",
                    child: new Text("全部")
                    ),
                new CustomDropdownMenuItem <string>(
                    value: "online",
                    child: new Text("线上")
                    ),
                new CustomDropdownMenuItem <string>(
                    value: "offline",
                    child: new Text("线下")
                    )
            },
                               onChanged: newValue => {
                if (this._selectValue != newValue)
                {
                    this.setState(() => this._selectValue = newValue);
                }
            },
                               headerWidget: new Container(height: 6, color: CColors.White),
                               footerWidget: new Container(height: 6, color: CColors.White)
                               )
                           )
                       ));
        }