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( _scaffoldKey, 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: () => { setState(() => { _fabShape = _fabShape == kCircularFab ? kDiamondFab : kCircularFab; }); } ) } ), new Scrollbar( child: new ListView( padding: EdgeInsets.only(bottom: 88.0f), children: new List <Widget> { new _Heading("FAB Shape"), new _RadioItem <Widget>(kCircularFab, _fabShape, _onFabShapeChanged), new _RadioItem <Widget>(kDiamondFab, _fabShape, _onFabShapeChanged), new _RadioItem <Widget>(kNoFab, _fabShape, _onFabShapeChanged), new Divider(), new _Heading("Notch"), new _RadioItem <bool>(kShowNotchTrue, _showNotch, _onShowNotchChanged), new _RadioItem <bool>(kShowNotchFalse, _showNotch, _onShowNotchChanged), new Divider(), new _Heading("FAB Position"), new _RadioItem <FloatingActionButtonLocation>(kFabEndDocked, _fabLocation, _onFabLocationChanged), new _RadioItem <FloatingActionButtonLocation>(kFabCenterDocked, _fabLocation, _onFabLocationChanged), new _RadioItem <FloatingActionButtonLocation>(kFabEndFloat, _fabLocation, _onFabLocationChanged), new _RadioItem <FloatingActionButtonLocation>(kFabCenterFloat, _fabLocation, _onFabLocationChanged), new Divider(), new _Heading("App bar color"), new _ColorsItem(kBabColors, _babColor, _onBabColorChanged) } ) ), _fabShape.value, _fabLocation.value, bottomNavigationBar: new _DemoBottomAppBar( _babColor, _fabLocation.value, _selectNotch() ) )); }
private void _onFabShapeChanged(_ChoiceValue <Widget> value) { setState(() => { _fabShape = value; }); }
private void _onFabLocationChanged(_ChoiceValue <FloatingActionButtonLocation> value) { setState(() => { _fabLocation = value; }); }
private void _onShowNotchChanged(_ChoiceValue <bool> value) { setState(() => { _showNotch = value; }); }