Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请适配下flutter 3.0.1 #11

Closed
vance-liu opened this issue Jun 6, 2022 · 5 comments
Closed

请适配下flutter 3.0.1 #11

vance-liu opened this issue Jun 6, 2022 · 5 comments

Comments

@vance-liu
Copy link

vance-liu commented Jun 6, 2022

Describe the bug
非常感谢你们开源这么棒的项目!
不过我在升级flutter 3.0.1 时,遇到一些报错,请适配下。

To Reproduce
Steps to reproduce the behavior:
···
WidgetsBinding.instance!.addObserver(this);

SchedulerBinding.instance!.addPostFrameCallback((Duration timeStamp) {

PaintingBinding.instance!.imageCache!.evict(key);
···

Expected behavior

Screenshots

Versions (please complete the following information):

  • latest

Additional context

@wongkoo
Copy link
Collaborator

wongkoo commented Jun 6, 2022

已确认 flutter 3 下可正常运行 example。
请确认下,power_image_ext 是否已对应修改为 3.0.0
如果还是不行,请详细贴一下报错信息 与 flutter doctor,谢谢

@vance-liu
Copy link
Author

vance-liu commented Jun 6, 2022

SchedulerBinding.instance!.addPostFrameCallback((Duration timeStamp) {

PaintingBinding.instance!.imageCache!.evict(key);

PaintingBinding.instance!.imageCache!.evict(key);

flutter doctor

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.0.1, on macOS 12.3.1 21E258 darwin-x64, locale
    zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.2)
[✓] Android Studio (version 2021.2)
[✓] IntelliJ IDEA Community Edition (version 2022.1.2)
[✓] IntelliJ IDEA Community Edition (version 2022.1.1)
[✓] VS Code (version 1.67.2)
[✓] Connected device (2 available)
[✓] HTTP Host Availability

• No issues found!

@wongkoo

@vance-liu vance-liu changed the title 请适配下flutter 3 请适配下flutter 3.0.1 Jun 6, 2022
@wongkoo
Copy link
Collaborator

wongkoo commented Jun 6, 2022

@vance-liu 请问下错误信息是什么,你只是引用了三段代码😓

@vance-liu
Copy link
Author

@wongkoo 你试试就知道了,把感叹号去掉就行。

@wongkoo
Copy link
Collaborator

wongkoo commented Jun 6, 2022

@wongkoo 你试试就知道了,把感叹号去掉就行。

The '!' will have no effect because the receiver can't be null. Documentation Try removing the '!' operator.

是指这个 warning 吗,看起来不影响运行。

由于当前分支同时支持3.0前后的版本,因此暂时不好去掉,我想一下该如何处理。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants