Open kiumarsj opened 2 years ago
Did you find solution for this problem bro? I too tried lot ,but couldn't resolve it.Can you provide me solution for this...
I also had this problem and by changing the type of onPressed from Function to VoidCallback my problem was solved.
RoundIconButton({this.icon, this.onPressed});
final IconData? icon;
final VoidCallback? onPressed;
@kiumarsj Same problem here!
flutter version: 3.0.0 stable dart version 2.17.0 windows 10 android studio 2021.1 patch 3 physical phone: sm A505
Hi, I'm new to flutter and I have a problem in this section of angela's course. so in section 12, I did exactly what is in the course I defined a RoundedIconButton and the onPressed function. but when I want to call the onPressed and use the setState I get this overflow error from the screen and the flutter inspector.
this is the code:
RoundIconButton( icon: FontAwesomeIcons.minus, onPressed: () { setState(() { weight--; }); }, ),
if I don't use the setState, it doesn't overflow but there would be no value changing in the interface. it doesn't happen in the angela's code and I think it is because of flutter version. any idea?