Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bottom overflowed by 99885 pixels #31

Open
kiumarsj opened this issue May 21, 2022 · 3 comments
Open

Bottom overflowed by 99885 pixels #31

kiumarsj opened this issue May 21, 2022 · 3 comments

Comments

@kiumarsj
Copy link

kiumarsj commented May 21, 2022

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.
Screenshot_20220521-134715

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?

@JaganS-7
Copy link

Did you find solution for this problem bro?
I too tried lot ,but couldn't resolve it.Can you provide me solution for this...

@Zahra-Arabi
Copy link

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;

@Nasir035
Copy link

@kiumarsj Same problem here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants