0
我是新来Flutter,所以我试图进入它。但我一直在创建一个带有ExpansionPanels的ExpansionPanelList。就像标题中所说的那样,所有这一切都是在Google的Flutter中创建的。不能创建扩展面板列表中的项目在颤动
到目前为止我的代码:
import 'package:flutter/material.dart';
class ShoppingBasket extends StatefulWidget {
@override
ShoppingBasketState createState() => new ShoppingBasketState();
}
class ShoppingBasketState extends State<ShoppingBasket> {
@override
Widget build(BuildContext context) {
return new ExpansionPanelList(
children: <ExpansionPanel>[
new ExpansionPanel(
headerBuilder: _headerBuilder,
body: new Container(
child: new Text("body"),
),
)
],
);
}
Widget _headerBuilder(BuildContext context, bool isExpanded) {
return new Text("headerBuilder");
}
}
但是当我打开应用程序调试器说: 另一个异常被抛出:“包:扑/ src目录/渲染/ box.dart”:失败的断言:行1430 pos 12:'hasSize':不正确。
我搜索了很多,但我不能找到一种方法来帮助自己对不起:)
谢谢你:) –