Created
May 20, 2022 16:24
-
-
Save ashukasma/bb8fe75ec4d1eabecb4d7469304ef309 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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