Reputation: 7146
How to fix the following error?
A RenderFlex overflowed by 224 pixels on the bottom.
on the Column widget
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Read message'),
),
body: Column( //the error is here
children: [
Padding(
padding: const EdgeInsets.all(20.0).copyWith(bottom: 10),
child: Row( ...
Upvotes: 0
Views: 370
Reputation: 446
Depending on the device screen, these widgets can overflow, there are few solutions to handle it.
SingleChildScrollView( child: Column(children: children), )
ListView( children: children )
Column( children: [ ...children.take(2).toList(), // show first 2 children in Column Expanded( child: ListView( children: children.getRange(3, children.length).toList(), ), // And rest of them in ListView ), ], )
Upvotes: 1