0
Everette posted
Flutter : Error - RenderBox was not laid out: RenderPointerListener#f99db relayoutBoundary=up18 NEEDS-PAINT
Flutter : Error - RenderBox was not laid out: RenderPointerListener#f99db relayoutBoundary=up18 NEEDS-PAINT
class Test extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title:Row( children:<Widget> [ TopbarSearchText()], ),
)
)
);
}
}
class TopbarSearchText extends StatelessWidget {
@override
Widget build(BuildContext context) {
return TextField(
decoration: const InputDecoration(
fillColor: Colors.white,filled: true,
border: OutlineInputBorder(),
prefixIcon: Icon(Icons.search),
hintText: 'Enter a search term'),
);
}
}
i am inserting the Row with multiple children at AppBar and getting error :
The following assertion was thrown during performLayout():
RenderBox was not laid out: RenderIgnorePointer#abaa5 relayoutBoundary=up16 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
'package:flutter/src/rendering/box.dart':
Failed assertion:: 'hasSize'
Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.