change widget to statefullwidget, showModalBottomSheet(statefullwidget)
showModalBottomSheet( context: context, builder: (context) { return StatefulBuilder( builder: (BuildContext context, StateSetter setState /*You can rename this!*/) { return Container( height: heightOfModalBottomSheet, child: RaisedButton(onPressed: () { setState(() { heightOfModalBottomSheet += 10; }); }), ); }); });
Обсуждают сегодня