skip to Main Content

I am page like this photo in flutter: enter image description here

how could i fix this error?
I need to see page completely.

just want to see page with all components.

when I add another widget always did not dload all page with all widgets.

my code is like here:

return Scaffold(
  appBar: myMobileAppBar(false),
  body: Container(
    padding: const EdgeInsets.fromLTRB(15, 10, 10, 15),
    width: double.infinity,
    height: double.infinity,
    decoration: myDecoration,
    child: Column(
      children: [
        const MyLableObligatori(
          inputtext: 'Codice Prodotto:',
        ),
        Row(
          //Mycode
        ),
        const MyLable(inputtext: 'Codice Fattura:'),
        const MyTextField(),
        const MyLable(inputtext: 'Descrizione:'),
        const MyTextField(maxsize: 5),
        const SizedBox(
          height: 20,
        ),
        //Categoria List
        //const CategoriaList(),
        PrintCatList(categoriaDataSource),

        Row(
          //Mycode
        ),
        const SizedBox(
          height: 20,
        ),
        const MyLableObligatori(inputtext: 'Nome Fornitore:'),
        DropdownButton(items: null, onChanged: null),
        Align(
            //Mycode
          ),
        ),
      ],
    ),
  ),
);

3

Answers


  1. I think you have to wrap your column widget inside the singlechildscrollview. And also you have to manage all things inside the column ,have a fixed height or wrap with expanded or flexible.

    Login or Signup to reply.
  2. You need to add the Singlechildscrollview inside Column with Fixed Height and Adjust it properly by giving static/dynamic height in the app.

    LayoutBuilder(
      builder: (_, constraints) {
        double viewSize= constraints.maxHeight;
        if (viewSize > minSize) return child;
        return SingleChildScrollView(
          scrollDirection: Axis.vertical,
          child: ConstrainedBox(
            constraints: BoxConstraints(maxHeight: viewSize, maxWidth: isHz ? minSize : //width here),
            child: // Your widgets here.,
          ),
        )
    
    Login or Signup to reply.
  3. That is because your content isn’t scrollable and the widgets take more space than your screen height.Therefore your body gets overflowed. Try one of the following properties.

    1.Add following to your Scaffold:

    resizeToAvoidBottomInset: true
    

    2.Wrap your widget in SingleChildScrollView

        SingleChildScrollView(
      child: ColumnName(),
      )
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search