mercredi 8 juillet 2020

FLUTTER: Incorret use of parentdata widget when expanded is in a flex widget

I'm getting the follwing error in my code. Incorrect use of ParentDataWidget. What I've read so far is that this usually happens when a Expanded widget is not inside a flex widget (Row, Column --- etc), but if I'm not mistaken my Expanded widget is inside a Column. Anyone has any Idea what kind of problem I'm running into?

SettingsTable is a Table Widget containing -- TextFormField, DropDownButtons and some more widgets.

Scaffold(
      body: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: [Header(),
          Expanded(
            child: ListView(
              children: [
                SizedBox(height: 10,),
                Center(child: Container(alignment: Alignment.topLeft, width: 950,child: Text('Settings for your survey',style: TextStyle(fontSize: 22),))),
                SizedBox(height: 20,),
                Center(
                  child: Container(
                    width: 950,
                    child: SettingsTable(),
                  ),
                ),
                SizedBox(height: 400,),
                Footer()],
            ),
          ),
        ],
      ));

The webapp still works as intended with Google Chrome as an emulator but when I hosted the project it didn't work.I just assumed this error is why. Here are two pictures showing the difference. [Google Chrome as an emulator1 Hosted project




Aucun commentaire:

Enregistrer un commentaire