在我的颤振应用程序中,我有一个底部的表,显示的初始高度为100。当用户与工作表交互时(可能是手势检测或单击工作表上的按钮),我想增加工作表的高度(例如可能是500或全屏)。
是否可以在加载后更改板材的高度。
我的下半身像是
Widget _bottomSheetContainer(BuildContext context) {
return Container(
height: 100,
decoration: BoxDecoration(
border:
Border(top: BorderSide(color: Theme.of(context).dividerColor))),
child: Row(children: [
Expanded(
child: Padding(
padding: EdgeInsets.all(10.0),
child: Text('Some text here!'),
)
),
Expanded(
child: IconButton(
icon: Icon(Icons.arrow_upward),
// color: themeData.primaryColor,
onPressed: () => _onPressed(context)
),
),
]));
}
_onPressed(BuildContext context) {
BottomSheet w = context.widget;
// Can we change the container height (from 100 to 500) that's part of the bottom sheet from here?
}