Home > Software design >  No Material Widget Found and Bottom Overflowed By Huge number of Pixels
No Material Widget Found and Bottom Overflowed By Huge number of Pixels

Time:04-27

I'm new to Flutter. First of all, I've tried using Scaffold and also changing the mainAxisSize after looking at some answers here but both don't solve the issue. Setting the height of the container doesn't work as well. Here's where I use the midContent: Mainpage that includes midContent .
And here's my code for midContent:

return Container(
        height: 200,
        child: Padding(
            padding: EdgeInsets.all(3),
            child: Column(
              mainAxisSize: MainAxisSize.min,
              children: <Widget>[
                Row(
                    mainAxisSize: MainAxisSize.max,
                    mainAxisAlignment: MainAxisAlignment.center,
                    children: [
                      FaIcon(FontAwesomeIcons.ellipsis,
                          color: Colors.white, size: 30),
                      Padding(
                          padding: EdgeInsets.only(left: 2),
                          child: FaIcon(FontAwesomeIcons.ellipsis,
                              color: Colors.white, size: 30))
                    ]),
                Row(
                  mainAxisSize: MainAxisSize.min,
                  mainAxisAlignment: MainAxisAlignment.center,
                  children: <Widget>[
                    IconButton(
                        icon: const FaIcon(FontAwesomeIcons.eyeSlash,
                            size: 12, color: Color(0xF2FAA381)),
                        tooltip: 'Tap to show balance',
                        onPressed: () {}),
                    Padding(
                      padding: EdgeInsets.all(3),
                      child: Text(
                        'Show Balance',
                        style: TextStyle(
                            fontFamily: 'Lato',
                            fontSize: 12,
                            color: Color(0xF2FAA381),
                            decoration: TextDecoration.none),
                      ),
                    )
                  ],
                )
              ],
            )));
  }

CodePudding user response:

Make sure that the main widget where the topBar widget is called has this tree :

MaterialApp(
   home: Scaffold(
      body: ...
   )
);

It can be more simple and easy to help you, if you provide a full description of the code where the topBar is called.

  • Related