【发布时间】:2023-01-16 17:11:06
【问题描述】:
我对下面的代码有疑问
Align(
alignment: Alignment.center,
child:Expanded(
child: Container(
decoration: AppDecoration.fillGray100.copyWith(
borderRadius: BorderRadiusStyle.roundedBorder16,
),
child: Expanded(
child: Column(
children: [
Expanded(
child: Row(
children: [
Container(
padding: getPadding(
all: 12,
),
decoration: AppDecoration.fillGray100,
child: Expanded(
child: Row(
children: [
Expanded(
child: Column(
mainAxisAlignment:
MainAxisAlignment.start,
children: [
CustomImageView(
svgPath:
ImageConstant.imgSearch,
height: getSize(
24.00,
),
width: getSize(
24.00,
),
margin: getMargin(
all: 12,
),
),
],
),
),
],
),
),
),
AppbarTitle(
text: "lbl_search_doctor".tr,
margin: getMargin(
left: 16,
top: 14,
right: 125,
bottom: 14,
),
),
],
),
),
],
),
),
),
),
),
错误信息: 'package:flutter/src/rendering/shifted_box.dart':断言失败:第 361 行 pos 12:'child!.hasSize':不正确。
RenderBox 未布局:RenderDecoratedBox#79ea0 relayoutBoundary=up2 '包:flutter/src/rendering/box.dart': 断言失败:第 2001 行第 12 行:'hasSize'
这是错误消息,此代码之前没有单个滚动视图
【问题讨论】:
标签: flutter