В моем приложении флаттера у меня есть нижний лист, который отображается с некоторой начальной высотой, скажем, 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?
}