public Widget _buildBottomList() { PageController pc = new PageController(Model.typeNames.Count); return(new Container( child: new Column( children: new List <Widget> { new Row( mainAxisAlignment: MainAxisAlignment.start, children: new List <Widget> { new Expanded(flex: 2, child: new Row(children: _labels())), new Expanded( child: new IconButton( iconSize: 18, icon: new Icon(icon: MyIcons.cancel) ) ) , } ), PageView.builder( controller: pc, itemBuilder: (con, index) => { return new Text(index.ToString()); }) } ) )); }
public override Widget build(BuildContext context) { string previousTooltipText = $"{_localizations.previousMonthTooltip} {_localizations.formatMonthYear(_previousMonthDate)}"; string nextTooltipText = $"{_localizations.nextMonthTooltip} {_localizations.formatMonthYear(_nextMonthDate)}"; Color controlColor = Theme.of(context).colorScheme.onSurface.withOpacity(0.60f); return(new Column( children: new List <Widget> { new Container( padding: EdgeInsetsDirectional.only(start: 16, end: 4), height: material_._subHeaderHeight, child: new Row( children: new List <Widget> { new Spacer(), new IconButton( icon: new Icon(Icons.chevron_left), color: controlColor, tooltip: _isDisplayingFirstMonth ? null : previousTooltipText, onPressed: _isDisplayingFirstMonth ? (VoidCallback)null : _handlePreviousMonth ), new IconButton(icon: new Icon(Icons.chevron_right), color: controlColor, tooltip: _isDisplayingLastMonth ? null : nextTooltipText, onPressed: _isDisplayingLastMonth ? (VoidCallback)null : _handleNextMonth ) } ) ), new _DayHeaders(), new Expanded( child: PageView.builder( controller: _pageController, itemBuilder: _buildItems, itemCount: utils.monthDelta(widget.firstDate, widget.lastDate) + 1, scrollDirection: Axis.horizontal, onPageChanged: _handleMonthPageChanged ) ) } )); }
public override Widget build(BuildContext context) { return(new SizedBox( width: DatePickerUtils._kMonthPickerPortraitWidth, height: DatePickerUtils._kMaxDayPickerHeight, child: new Stack( children: new List <Widget> { new NotificationListener <ScrollStartNotification>( onNotification: (_) => { this._chevronOpacityController.forward(); return false; }, child: new NotificationListener <ScrollEndNotification>( onNotification: (_) => { this._chevronOpacityController.reverse(); return false; }, child: PageView.builder( dragStartBehavior: this.widget.dragStartBehavior, key: new ValueKey <DateTime>(this.widget.selectedDate), controller: this._dayPickerController, scrollDirection: Axis.horizontal, itemCount: _monthDelta(this.widget.firstDate, this.widget.lastDate) + 1, itemBuilder: this._buildItems, onPageChanged: this._handleMonthPageChanged ) ) ), new Positioned( top: 0.0f, left: 8.0f, child: new FadeTransition( opacity: this._chevronOpacityAnimation, child: new IconButton( icon: new Icon(Icons.chevron_left), tooltip: this._isDisplayingFirstMonth ? null : $"{this.localizations.previousMonthTooltip} {this.localizations.formatMonthYear(this._previousMonthDate)}", onPressed: this._isDisplayingFirstMonth ? (VoidCallback)null : this._handlePreviousMonth ) ) ), new Positioned( top: 0.0f, right: 8.0f, child: new FadeTransition( opacity: this._chevronOpacityAnimation, child: new IconButton( icon: new Icon(Icons.chevron_right), tooltip: this._isDisplayingLastMonth ? null : $"{this.localizations.nextMonthTooltip} {this.localizations.formatMonthYear(this._nextMonthDate)}", onPressed: this._isDisplayingLastMonth ? (VoidCallback)null : this._handleNextMonth ) ) ) } ) )); }