Flutter 小部件在向下滑动后不可见

Flutter 小部件在向下滑动后不可见,flutter,dart,Flutter,Dart,错误:未处理的异常:“包:flatter/src/services/platform\u views.dart”:失败的断言:第548行位置12:“!size.isEmpty':不正确。 我的代码: return SnappingSheet( child: SmartRefresher( child: Column( mainAxisAlignment: MainAxisAlignment.center,

错误:
未处理的异常:“包:flatter/src/services/platform\u views.dart”:失败的断言:第548行位置12:“!size.isEmpty':不正确。

我的代码:

  return SnappingSheet(
          child: SmartRefresher(
            child: Column(
              mainAxisAlignment: MainAxisAlignment.center,
              crossAxisAlignment: CrossAxisAlignment.stretch,
              children: <Widget>[
                Row(
                  crossAxisAlignment: CrossAxisAlignment.center,
                  mainAxisAlignment: MainAxisAlignment.center,
                  children: <Widget>[
                    Icon(
                      Icons.location_on,
                      color: Colors.blueAccent,
                    ),
                    Text(
                      snapshot.data.city.toUpperCase(),
                      textAlign: TextAlign.center,
                      style: TextStyle(
                          fontWeight: FontWeight.w900,
                          fontSize: 36,
                          color: Colors.blueAccent),
                    ),
                  ],
                ),
                Text(
                  snapshot.data.weatherData[0].main.toString(),
                  textAlign: TextAlign.center,
                  style: TextStyle(
                      fontWeight: FontWeight.w900,
                      fontSize: 20,
                      color: Colors.grey),
                ),
                Image.asset(
                  iconWeather(snapshot.data.weatherData[0].icon),
                  height: 160,
                ),
                Row(
                  mainAxisAlignment: MainAxisAlignment.center,
                  crossAxisAlignment: CrossAxisAlignment.center,
                  textBaseline: TextBaseline.ideographic,
                  children: <Widget>[
                    Text(
                      snapshot.data.temp.toInt().toString(),
                      style: TextStyle(
                          fontWeight: FontWeight.w900,
                          fontSize: 65,
                          color: Colors.blueAccent),
                    ),
                    Text(
                      "॰",
                      style: TextStyle(
                          fontWeight: FontWeight.w900,
                          fontSize: 60,
                          color: Colors.blueAccent),
                    )
                  ],
                ),
              ],
            ),
            enablePullDown: true,
            header: ClassicHeader(),
            controller: _refreshController,
            onRefresh: _onRefresh,
            onLoading: _onLoading,
          ),
          sheetBelow: Container(
            color: Colors.white,
            child: GoogleMap(
              initialCameraPosition: CameraPosition(
                  target: LatLng(Location.latitude, Location.longitude),
                  zoom: 18),
//                  markers: ,
              myLocationEnabled: true,
              onMapCreated: onMapCreated,
            ),
          ),
          grabbing: Container(
            color: Colors.blue,
            padding: EdgeInsets.only(top: 10),
            child: Text(
              "See in Map",
              textAlign: TextAlign.center,
              style: TextStyle(
                fontSize: 30,
                color: Colors.white,
                fontWeight: FontWeight.bold,
              ),
            ),
          ),
        );
返回捕捉表(
孩子:智能复习(
子:列(
mainAxisAlignment:mainAxisAlignment.center,
crossAxisAlignment:crossAxisAlignment.stretch,
儿童:[
划船(
crossAxisAlignment:crossAxisAlignment.center,
mainAxisAlignment:mainAxisAlignment.center,
儿童:[
图标(
Icons.location_on,
颜色:Colors.blueAccent,
),
正文(
snapshot.data.city.toUpperCase(),
textAlign:textAlign.center,
样式:TextStyle(
fontWeight:fontWeight.w900,
尺寸:36,
颜色:颜色。蓝色调),
),
],
),
正文(
snapshot.data.weatherData[0].main.toString(),
textAlign:textAlign.center,
样式:TextStyle(
fontWeight:fontWeight.w900,
尺寸:20,
颜色:颜色。灰色),
),
影像资产(
iconWeather(snapshot.data.weatherData[0].icon),
身高:160,
),
划船(
mainAxisAlignment:mainAxisAlignment.center,
crossAxisAlignment:crossAxisAlignment.center,
textBaseline:textBaseline.ideographic,
儿童:[
正文(
snapshot.data.temp.toInt().toString(),
样式:TextStyle(
fontWeight:fontWeight.w900,
尺码:65,
颜色:颜色。蓝色调),
),
正文(
"॰",
样式:TextStyle(
fontWeight:fontWeight.w900,
尺寸:60,
颜色:颜色。蓝色调),
)
],
),
],
),
enablePullDown:true,
标题:ClassCheader(),
控制器:\u刷新控制器,
onRefresh:\u onRefresh,
加载:_-onload,
),
下表:集装箱(
颜色:颜色,白色,
孩子:谷歌地图(
initialCameraPosition:CameraPosition(
目标:LatLng(位置.纬度,位置.经度),
缩放:18),
//标记:,
myLocationEnabled:对,
onMapCreated:onMapCreated,
),
),
抓取:容器(
颜色:颜色,蓝色,
填充:仅限边缘设置(顶部:10),
子:文本(
“见地图中”,
textAlign:textAlign.center,
样式:TextStyle(
尺寸:30,
颜色:颜色,白色,
fontWeight:fontWeight.bold,
),
),
),
);

最好的解决方案是用堆栈包装GoogleMaps小部件并定位。这可以防止在折叠工作表时地图收缩到零高度。 阿达姆约翰松

最好的解决方案是用堆栈包装GoogleMaps小部件并进行定位。这可以防止地图在折叠时收缩到零高度。 阿达姆约翰松