I was trying to create a scrollable screen, not the widgets inside but the whole screen on Flutter but I get some errors like below:
======== Exception caught by rendering library ===================================================== RenderBox was not laid out: RenderFlex#f643b relayoutBoundary=up13 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE 'package:flutter/src/rendering/box.dart': Failed assertion: line 1920 pos 12: 'hasSize' The relevant error-causing widget was:
SingleChildScrollView
Here is the code of one of the shown widgets:
var _settingsPage = StatefulBuilder(
builder: (BuildContext context, StateSetter setState) {
return Scaffold(
body: Row(
children: [
Flexible(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
SingleChildScrollView(
scrollDirection: Axis.vertical,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Row(
children: [
FloatingActionButton(
child: Icon(Icons.casino),
onPressed: changeHome,
),
],
),
Flexible(
fit: FlexFit.loose,
child: SingleChildScrollView(
scrollDirection: Axis.vertical,
child: Text(
_helpString,
textAlign: TextAlign.center,
),
),
),
Container(
alignment: Alignment.center,
padding: EdgeInsets.fromLTRB(10, 10, 10, 10),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const Text('Is your character epic?'),
Checkbox(
value: _epic,
onChanged: (bool epic) {
setState(
() {
_epic = epic;
},
);
},
),
],
),
),
],
),
),
],
),
),
],
),
);
},
);