小编e-j*_*-j5的帖子

类 AMSupportURLConnectionDelegate 在两者中都实现

我正在尝试在 M1 mac 上构建一个 flutter 应用程序并收到以下错误。

$ flutter build ios --release
Building XXX for device (ios-release)...
Automatically signing iOS for device deployment using specified development team in Xcode project: XXX
Running pod install...                                             13.2s
Running Xcode build...
Xcode build done.                                            6.7s
Failed to build iOS app
Error output from Xcode build:
?
    objc[65074]: Class AMSupportURLConnectionDelegate is implemented in both ?? (0x1f66de518) and ?? (0x1160d82b8). One
    of the two will be used. Which one is undefined.
    objc[65074]: Class AMSupportURLSession is implemented …
Run Code Online (Sandbox Code Playgroud)

ios flutter

39
推荐指数
9
解决办法
3万
查看次数

Flutter Google Maps,如何检测用户而不是控制器的地图区域变化

我正在使用 Google 地图在地图上显示标记,并使用其他小部件来描述地图上的每个标记。我已成功实现,当用户在小部件上选项卡时,地图区域将发生变化以使匹配标记成为地图的中心。我还有“搜索该区域”按钮来搜索地图区域。困难的部分是控制如何隐藏/显示“搜索此区域”按钮。到目前为止,我已经实现了它在地图区域更改时显示。但是,每次小部件上的用户选项卡更改地图区域时,它都会导致该按钮出现。

我只想检测用户手动更改的地图区域,例如捏放大/缩小、拖动等。

google-maps flutter

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

有没有办法在渲染之前计算文本宽度?

我有一个固定大小的盒子,我需要传递高度值。

在框中,我有一个可能溢出的文本小部件,因此我需要将“maxLines”设置为 2。但是,由于框高度是固定的,因此文本小部件不会占用 2 行。

我可以将更大的值传递给框的高度,但如果“文本”小部件仅占用 1 行,则看起来不太好。

如果我可以计算文本小部件的总像素,然后通过将其与固定大小框的宽度进行比较来计算出文本小部件需要多少行,那就太好了。

    SizedBox(
      child: Text(
        title,
        style: Theme.of(context).textTheme.headline6,
        maxLines: 2,
      ),
      width: 300,
      height: 60,
    ),
Run Code Online (Sandbox Code Playgroud)

例如

      height: Theme.of(context).textTheme.headline6.fontSize * title.length > 300? 72 : 60
Run Code Online (Sandbox Code Playgroud)

flutter

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

标签 统计

flutter ×3

google-maps ×1

ios ×1