swiper 插件空安全报错,请问老师应该如何解决

来源:8-4 轮播图Banner功能开发【使用轮子】

weixin_慕无忌8341780

2021-07-14

Launching lib/main.dart on iPhone 12 Pro Max in debug mode...
Running Xcode build...
Xcode build done.                                           12.6s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    Error: Cannot run with sound null safety, because the following dependencies
    don't support null safety:

     - package:flutter_swiper
     - package:flutter_page_indicator
     - package:transformer_page_view

    For solutions, see https://dart.dev/go/unsound-null-safety

    Command PhaseScriptExecution failed with a nonzero exit code
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Analyzing workspace
    note: Constructing build description
    note: Build preparation complete

Could not build the application for the simulator.
Error launching application on iPhone 12 Pro Max.

flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.2.3, on macOS 11.4 20F71 darwin-x64, locale zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.0)
[✓] Connected device (2 available)

写回答

1回答

weixin_慕无忌8341780

提问者

2021-07-14

已经解决了,使用了

flutter_swiper_null_safety: ^1.0.2

代替原来的swiper

1
0

Flutter从入门到进阶 实战携程网App 一网打尽核心技术

解锁Flutter开发新姿势,,系统掌握Flutter开发核心技术。

4788 学习 · 3270 问题

查看课程