当我放置一个 Text 小部件只是为了测试时,程序显示“A RenderFlex 在右侧溢出了 34 个像素。”。我试图将文本放入容器中,但它也不起作用。看打印:
CupertinoPageScaffold(
navigationBar: CupertinoNavigationBar(
middle: Row(
children: <Widget>[
Expanded(
child: Padding(
padding: EdgeInsets.fromLTRB(10.0, 0.0, 0.0, 0.0),
child: CupertinoTextField(
prefix: Padding(
padding: EdgeInsets.fromLTRB(5.0, 0.0, 0.0, 0.0),
child: Icon(
IconData(0xF4A4,
fontFamily: "CupertinoIcons",
fontPackage: CupertinoIcons.iconFontPackage),
color: CupertinoColors.darkBackgroundGray,
),
),
placeholder: 'O que você procura?',
),
),
),
Padding(
padding: EdgeInsets.fromLTRB(5.0, 0.0, 5.0, 0.0),
child: FittedBox(
fit: BoxFit.contain,
child: CupertinoButton(
child: Icon(
IconData(0xF370,
fontFamily: "CupertinoIcons",
fontPackage: CupertinoIcons.iconFontPackage),
size: 80.0,
color: CupertinoColors.black),
onPressed: () {},
),
),
),
],
),
backgroundColor: CupertinoColors.systemGroupedBackground,
),
child: Text("Teste"),
);