나는 플러터 코드 아래에 있습니다.
Widget build(BuildContext context) {
return Center(
child: Card(
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Row(
children: <Widget>[
SizedBox(
height: 100,
child: ListTile(
leading: IconButton(
iconSize: 30,
icon: roundImage(post.userPicture, Icon(Icons.person)),
onPressed: () {},
),
subtitle: Text(this.post.message),
)),
],
),
],
),
),
);
}
하지만이 오류가 발생합니다.
════════ Exception caught by rendering library ═════════════════════════════════
RenderBox was not laid out: RenderPhysicalShape#7713c relayoutBoundary=up3
'package:flutter/src/rendering/box.dart':
Failed assertion: line 1687 pos 12: 'hasSize'
The relevant error-causing widget was
Card
내가 추가 한 SizedBox
에 Row
하지만 여전히 불평 hasSize
오류입니다. 이 문제를 어떻게 해결할 수 있습니까?
달성하려는 것이 명확하지 않지만 사용하는 대신 SizedBox
내부 Expanded
또는 Flexible
위젯을 래핑 할 수 있습니다.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다