singlechildscrollview fill remaining code example

Example 1: singlechildscrollview not working inside column

Simply wrap your "SingleChildScrollView" widget with "Expanded" widget and it will work...
:)

Widget build(BuildContext context) =>
Scaffold(
  body: Column(
    children: <Widget>[
      Container(...),
      // Here... Wrap your "SingleChildScrollView" with "Expanded"
      Expanded(
        child: SingleChildScrollView(
          child: Container(...),
        ),
      ),
    ],
  ),
);

Example 2: flutter overflow when setting height of container inside singlechildscrollview

SingleChildScrollView(
  child: ConstrainedBox(
  	constraints: BoxConstraints(
  		height: MediaQuery.of(context).size.height,
  	),
  	child: Container(
  		//contents of container
  	),
  ),
),

Tags:

Misc Example