Identical Flutter Widgets in Row throwing error?
Try adding a unique heroTag
for each of the FloatingActionButton
s, so that Flutter does not confuse the two button with each other, something like:
new Row( mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ new FloatingActionButton( heroTag: "Decline", child: new Icon(Icons.remove), onPressed: _decline), new Padding(padding: new EdgeInsets.all(10.0)), new Text( _count.toString(), style: new TextStyle( fontSize: 40.0, fontWeight: FontWeight.bold, color: Colors.black), ), new Padding(padding: new EdgeInsets.all(10.0)), new FloatingActionButton( heroTag: "Increment", child: new Icon(Icons.add), onPressed: _increment), ], ),