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( ...
Wrap your Column
with a SingleChildScrollView
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 ), ], )
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.