12

Flutter 处理 Error Setter not found AsciiChar 问题 - 技术小黑屋

 1 year ago
source link: https://droidyue.com/blog/2022/10/11/flutter-error-member-not-found-asciichar/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Flutter 处理 Error Setter Not Found AsciiChar 问题

Oct 11th, 2022

当我们进行了 flutter 升级后,有时候运行程序会发现无法编译,出现下面这样的错误

[        ] [   +2 ms] ../../../../.pub-cache/hosted/pub.flutter-io.cn/cached_network_image-3.2.0/lib/src/image_provider/multi_image_stream_completer.dart:152:22: Warning: Operand of null-aware operation '?.' has
type 'SchedulerBinding' which excludes null.
[        ] [        ]  - 'SchedulerBinding' is from 'package:flutter/src/scheduler/binding.dart' ('../../../../code/flutter_3/packages/flutter/lib/src/scheduler/binding.dart').
[        ] [        ]     SchedulerBinding.instance?.scheduleFrameCallback(_handleAppFrame);
[        ] [        ]                      ^
[ +402 ms] [ +414 ms] ../../../../.pub-cache/hosted/pub.flutter-io.cn/win32-2.3.1/lib/src/structs.g.dart:554:31: Error: Member not found: 'UnicodeChar'.
[        ] [        ]   int get UnicodeChar => Char.UnicodeChar;
[        ] [        ]                               ^^^^^^^^^^^
[        ] [        ] ../../../../.pub-cache/hosted/pub.flutter-io.cn/win32-2.3.1/lib/src/structs.g.dart:555:38: Error: Setter not found: 'UnicodeChar'.
[        ] [        ]   set UnicodeChar(int value) => Char.UnicodeChar = value;
[        ] [        ]                                      ^^^^^^^^^^^
[        ] [        ] ../../../../.pub-cache/hosted/pub.flutter-io.cn/win32-2.3.1/lib/src/structs.g.dart:557:29: Error: Member not found: 'AsciiChar'.
[        ] [        ]   int get AsciiChar => Char.AsciiChar;
[        ] [        ]                             ^^^^^^^^^
[        ] [        ] ../../../../.pub-cache/hosted/pub.flutter-io.cn/win32-2.3.1/lib/src/structs.g.dart:558:36: Error: Setter not found: 'AsciiChar'.
[        ] [        ]   set AsciiChar(int value) => Char.AsciiChar = value;
[        ] [        ]                                    ^^^^^^^^^

对于这种问题,解决起来也比较简单,执行

flutter pub upgrade
droidyue_gzh_green_png.png

快来解锁最新版 Typora,新用户券后仅需 84 元!
如何便宜的购买 office 365 ?
新版赤友 NTFS 助手来袭,正版超低价

Posted by androidyue

Oct 11th, 2022Flutter, dart

« iSlide 插件买两年送 180 天,每月不到 6 元钱


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK