FlatButton(
child: Text('ORDER NOW'),
onPressed: () {
Provider.of<Orders>(context, listen: false).addOrder(
cart.items.values.toList(),
cart.totalAmount,
);
cart.clear();
},
textcolor: Theme.of(context).primaryColor,
After upgrade Flutter 3.3.0 RaisedButton showing error: The method 'FlatButton' isn't defined for the type 'CartScreen'. (undefined_method
25.4k Views Asked by farouk sherif At
3
There are 3 best solutions below
0

According to the Flutter 3.3.0 release notes, the deprecated RaisedButton
was removed in GitHub pull request #98547.
You can check breaking-changes/buttons
To have the same visual look
You can find more about restoring-the-original-button-visuals