【问题标题】:Flutter Build Image as MapFlutter 将图像构建为地图
【发布时间】:2022-01-23 15:49:06
【问题描述】:

我有一张图片,我想像 Google 地图插件一样使用它。

如您所见。我希望它伸展到整个屏幕并能够用手指移动它。我尝试了 Position() 小部件,但无法使其工作。

这是我正在处理的代码。

@override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          title: Text(widget.title),
          backgroundColor: renk,
          leading: Builder(
              builder: (context) => IconButton(
                  icon: new Icon(Icons.info),
                  onPressed: () => Scaffold.of(context).openDrawer())),
        ),
        drawer: new Drawer(
          child: Container(color: renk),
        ),
        body: Image.asset('assets/images/kizilbitmis.png'),
        floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat,
        floatingActionButton: Padding(
          padding: const EdgeInsets.all(8.0),
          child: Row(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[
              FloatingActionButton.extended(
                  backgroundColor: renk,
                  heroTag: "listefalanbruh",
                  onPressed: () {
                    Navigator.push(context,
                        MaterialPageRoute(builder: (context) => Liste()));
                  },
                  icon: Icon(Icons.list),
                  label: Text('Kuş Listesi')),
              SizedBox(
                width: 40,
              ),
              FloatingActionButton.extended(
                  backgroundColor: renk,
                  heroTag: "qrcodefalanbruh",
                  onPressed: _scanQR,
                  icon: Icon(Icons.qr_code),
                  label: Text('QR Kod'))
            ],
          ),
        ));
  }

【问题讨论】:

    标签: flutter dart


    【解决方案1】:

    我认为InteractiveViewer 可能会解决您的问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-04-01
      • 1970-01-01
      • 2023-01-13
      • 1970-01-01
      • 2019-10-28
      • 1970-01-01
      • 2018-12-05
      相关资源
      最近更新 更多