public _RadioItem(_ChoiceValue <T> value, _ChoiceValue <T> groupValue, ValueChanged <_ChoiceValue <T> > onChanged) { this.value = value; this.groupValue = groupValue; this.onChanged = onChanged; }
public override Widget build(BuildContext context) { return(new Scaffold( key: _scaffoldKey, appBar: new AppBar( title: new Text("Bottom app bar"), elevation: 0.0f, actions: new List <Widget> { new MaterialDemoDocumentationButton(BottomAppBarDemo.routeName), new IconButton( icon: new Icon(Icons.sentiment_very_satisfied), onPressed: () => { this.setState(() => { this._fabShape = this._fabShape == kCircularFab ? kDiamondFab : kCircularFab; }); } ) } ), body: new ListView( padding: EdgeInsets.only(bottom: 88.0f), children: new List <Widget> { new _AppBarDemoHeading("FAB Shape"), new _RadioItem <Widget>(kCircularFab, this._fabShape, this._onFabShapeChanged), new _RadioItem <Widget>(kDiamondFab, this._fabShape, this._onFabShapeChanged), new _RadioItem <Widget>(kNoFab, this._fabShape, this._onFabShapeChanged), new Divider(), new _AppBarDemoHeading("Notch"), new _RadioItem <bool>(kShowNotchTrue, this._showNotch, this._onShowNotchChanged), new _RadioItem <bool>(kShowNotchFalse, this._showNotch, this._onShowNotchChanged), new Divider(), new _AppBarDemoHeading("FAB Position"), new _RadioItem <FloatingActionButtonLocation>(kFabEndDocked, this._fabLocation, this._onFabLocationChanged), new _RadioItem <FloatingActionButtonLocation>(kFabCenterDocked, this._fabLocation, this._onFabLocationChanged), new _RadioItem <FloatingActionButtonLocation>(kFabEndFloat, this._fabLocation, this._onFabLocationChanged), new _RadioItem <FloatingActionButtonLocation>(kFabCenterFloat, this._fabLocation, this._onFabLocationChanged), new Divider(), new _AppBarDemoHeading("App bar color"), new _ColorsItem(kBabColors, this._babColor, this._onBabColorChanged) } ), floatingActionButton: this._fabShape.value, floatingActionButtonLocation: this._fabLocation.value, bottomNavigationBar: new _DemoBottomAppBar( color: this._babColor, fabLocation: this._fabLocation.value, shape: this._selectNotch() ) )); }
void _onFabShapeChanged(_ChoiceValue <Widget> value) { this.setState(() => { this._fabShape = value; }); }
void _onFabLocationChanged(_ChoiceValue <FloatingActionButtonLocation> value) { this.setState(() => { this._fabLocation = value; }); }
void _onShowNotchChanged(_ChoiceValue <bool> value) { this.setState(() => { this._showNotch = value; }); }