小编Mer*_*rym的帖子

自定义FlexibleSpaceBar小部件

我希望标题位于图像下方并与图像折叠......

我取得了什么成就

在此输入图像描述

home: Scaffold(
  body: CustomScrollView(
    slivers: <Widget>[
      SliverAppBar(

       expandedHeight: 220.0,
        floating: true,
        pinned: true,
        snap: true,
        elevation: 50,
        backgroundColor: Colors.pink,
        flexibleSpace: FlexibleSpaceBar(
            centerTitle: true,
            title: Text('Title',
                style: TextStyle(
                  color: Colors.white,
                  fontSize: 16.0,
                )),
            background: Image.network(
              'https://images.pexels.com/photos/443356/pexels-photo-443356.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940',
              fit: BoxFit.cover,
            )
        ),
      ),
      new SliverList(
          delegate: new SliverChildListDelegate(_buildList(50))
      ),
    ],
  ),
Run Code Online (Sandbox Code Playgroud)

我想要的是

在此输入图像描述

感谢帮助

flutter flutter-sliver flutter-layout

5
推荐指数
1
解决办法
8701
查看次数

滚动谷歌地图颤动时获取地图中心点

我正在我的应用程序中做一个应用程序。我正在使用谷歌地图 flutter,并且遇到了有关滚动的问题。当我滚动地图时,我想获取地图的中心点(长、纬度),也就是说,如果我滚动地图并停在某个位置,它将获取中心的位置点。

谁能建议如何解决这个问题?这可能非常有帮助,提前谢谢您..

location flutter google-maps-flutter

1
推荐指数
1
解决办法
1893
查看次数