After upgrading to Flutter 3.0 I am no longer able to build any of my apps for either iOS or Android and get the same errors in both builds:
: Error: Member not found: 'UnicodeChar'.
int get UnicodeChar => Char.UnicodeChar;
^^^^^^^^^^^
: Error: Setter not found: 'UnicodeChar'.
set UnicodeChar(int value) => Char.UnicodeChar = value;
^^^^^^^^^^^
: Error: Member not found: 'AsciiChar'.
int get AsciiChar => Char.AsciiChar;
^^^^^^^^^
: Error: Setter not found: 'AsciiChar'.
set AsciiChar(int value) => Char.AsciiChar = value;
^^^^^^^^^
and these errors are in the file "src/structs.g.dart" (part of Flutter/Dart as far as I can tell) as follows:
/// {@category Struct}
class _CHAR_INFO__Char_e__Union extends Union {
@Uint16()
external int UnicodeChar;
@Uint8()
external int AsciiChar;
}
extension CHAR_INFO_Extension on CHAR_INFO {
int get UnicodeChar => Char.UnicodeChar;
set UnicodeChar(int value) => Char.UnicodeChar = value;
int get AsciiChar => Char.AsciiChar;
set AsciiChar(int value) => Char.AsciiChar = value;
}
I am running VSCode 1.67.1 on macOS Monterey 12.3.1 and
flutter doctor -v
shows no errors found.
It appears that the file "src/structs.g.dart" seems to be part of the Win32 components in "pub.dartlang.org" but I am not building my apps for Windows (yet).
Any ideas on what I need to do to be able to build for iOS and Android again will be much appreciated.
Thanks
Les
CodePudding user response:
Delete the build folder, run flutter clean. I had the same problem with a macOS project and had to delete the macOs folder. Works fine afterwards.
CodePudding user response:
So, something which helped me:
I removed the next folder /Users/your-user/.pub-cache/hosted/pub.dartlang.org
and then try to run your project