Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save ashukasma/bb8fe75ec4d1eabecb4d7469304ef309 to your computer and use it in GitHub Desktop.

Select an option

Save ashukasma/bb8fe75ec4d1eabecb4d7469304ef309 to your computer and use it in GitHub Desktop.
class OrderPage extends StatefulWidget {
@override
_OrderPageState createState() => _OrderPageState();
}
class _OrderPageState extends State<OrderPage> {
bool isShowing = true;
@override
Widget build(BuildContext context) {
return Column(children: [
RaisedButton(
child: (Text('Delete blue')),
onPressed: () {
setState(() {
isShowing = false;
});
},
),
if (isShowing) CounterButton(color: Colors.blue),
CounterButton(color: Colors.red),
]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment