Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/flutter/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用react-native或flatter的地图效果_React Native_Flutter_Expo - Fatal编程技术网

使用react-native或flatter的地图效果

使用react-native或flatter的地图效果,react-native,flutter,expo,React Native,Flutter,Expo,我想实现一些类似react native中访问过的国家,或者可能是Flitter,使用google地图,我不知道是否可以制作一些动画,比如从银色默认地图上划出一个国家,如上图所示 我想实现一些动画上面的静态地图,但可能有一些已经实现,我没有发现类似的博览会或在颤振,。。。 有什么建议吗?您可以参考 这是一个简单的应用程序,它显示带有可单击区域的SVG图像。它显示荷兰的所有省份。当你点击它时,它会突出显示被点击的省份 下载此软件包后,执行命令flatterpackages pub run buil

我想实现一些类似react native中访问过的国家,或者可能是Flitter,使用google地图,我不知道是否可以制作一些动画,比如从银色默认地图上划出一个国家,如上图所示

我想实现一些动画上面的静态地图,但可能有一些已经实现,我没有发现类似的博览会或在颤振,。。。 有什么建议吗?

您可以参考

这是一个简单的应用程序,它显示带有可单击区域的
SVG图像
。它显示荷兰的所有省份。当你点击它时,它会突出显示被点击的省份

下载此软件包后,执行命令
flatterpackages pub run build\u runner build

[INFO] Generating build script...
[INFO] Generating build script completed, took 513ms
[INFO] Caching finalized dependency graph...
[INFO] Caching finalized dependency graph completed, took 52ms

[INFO] Succeeded after 13.6s with 1 outputs (5 actions)
工作演示

代码片段

Widget _buildProvince(Province province) {
    return ClipPath(
        child: Stack(children: <Widget>[
          CustomPaint(painter: PathPainter(province)),
          Material(
              color: Colors.transparent,
              child: InkWell(
                  onTap: () => _provincePressed(province),
                  child: Container(
                      color: _pressedProvince == province
                          ? Color(0xFF7C7C7C)
                          : Colors.transparent)))
        ]),
        clipper: PathClipper(province));
  }
Widget\u构建省(省){
返回ClipPath(
子:堆栈(子:[
CustomPaint(画家:PathPainter(省)),
材料(
颜色:颜色。透明,
孩子:InkWell(
onTap:()=>\u省按下(省),
子:容器(
颜色:_pressedProvince==省
?颜色(0xFF7C7C)
:颜色。透明)
]),
克利伯:路径克利伯(省));
}
您可以参考

这是一个简单的应用程序,它显示带有可单击区域的
SVG图像
。它显示荷兰的所有省份。当你点击它时,它会突出显示被点击的省份

下载此软件包后,执行命令
flatterpackages pub run build\u runner build

[INFO] Generating build script...
[INFO] Generating build script completed, took 513ms
[INFO] Caching finalized dependency graph...
[INFO] Caching finalized dependency graph completed, took 52ms

[INFO] Succeeded after 13.6s with 1 outputs (5 actions)
工作演示

代码片段

Widget _buildProvince(Province province) {
    return ClipPath(
        child: Stack(children: <Widget>[
          CustomPaint(painter: PathPainter(province)),
          Material(
              color: Colors.transparent,
              child: InkWell(
                  onTap: () => _provincePressed(province),
                  child: Container(
                      color: _pressedProvince == province
                          ? Color(0xFF7C7C7C)
                          : Colors.transparent)))
        ]),
        clipper: PathClipper(province));
  }
Widget\u构建省(省){
返回ClipPath(
子:堆栈(子:[
CustomPaint(画家:PathPainter(省)),
材料(
颜色:颜色。透明,
孩子:InkWell(
onTap:()=>\u省按下(省),
子:容器(
颜色:_pressedProvince==省
?颜色(0xFF7C7C)
:颜色。透明)
]),
克利伯:路径克利伯(省));
}