【发布时间】:2019-04-17 07:45:33
【问题描述】:
我想用地图创建一个简单的表单。此Layout 需要可滚动以显示地图(灵活 元素,忽略 Google Play 服务提醒)。我尝试使用 SingleChildScrollView 和 Slivers 但我不明白具体是如何工作的。
return Scaffold(
key: scaffoldKey,
resizeToAvoidBottomPadding: false,
body: orientation == Orientation.landscape
? new Row(children: <Widget>[map])
: new Column(
children: <Widget>[
new ListView(
padding: EdgeInsets.all(15.0),
shrinkWrap: true,
children: <Widget>[
new SafeArea(child: instalationDropdown),
alias,
new Divider(color: Colors.transparent),
SizedBox(height: 12.0),
new Text(
DemoLocalizations.of(context).trans('datameter'),
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 16, fontWeight: FontWeight.bold)),
datameter,
new Divider(color: Colors.transparent),
SizedBox(height: 12.0),
new Text(DemoLocalizations.of(context).trans('meter'),
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 16, fontWeight: FontWeight.bold)),
contador,
makerDropdown,
modeloDropdown,
other,
new Divider(color: Colors.transparent),
next,
],
),
map
],
),
所以问题是:¿如何将此布局转换为可滚动的?如果地图是固定元素并且只有表单具有滚动功能,它也很有用。
更新 2
如果我使用 SingleChildScrollView,则返回 blank view。
【问题讨论】:
标签: dictionary flutter scrollable