Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

flutter toggle color card on tap

new RaisedButton(
  child: new Text('Attention'),
  textColor: Colors.white,
  shape: new RoundedRectangleBorder(
    borderRadius: new BorderRadius.circular(30.0),
  ),
  color: pressAttention ? Colors.grey : Colors.blue,
  onPressed: () => setState(() => pressAttention = !pressAttention),
);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #flutter #toggle #color #card #tap
ADD COMMENT
Topic
Name
6+3 =