Flutter Error: Member not found: 'UnicodeChar'

Viewed 11861

After upgrading to flutter 3.0.0. i am getting this error:

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;

here is the image: enter image description here

3 Answers

In my case, it was one of the transitive dependencies that was outdated.

Upgrading dependencies resolved the issue for me.

From the Terminal (inside the project's folder):

flutter pub upgrade

From Visual Studio Code

  1. Open Command Palette... (⌘ Command+P on MacOS)
  2. Type Flutter: Upgrade Packages

From Android Studio

  1. Open Search Everywhere (Shift, Shift on MacOS)
  2. Type Flutter Pub Upgrade

To solve the error do the following

  1. upgrade all the third party packages
  2. flutter clean
  3. delete pubspec.lock file
  4. flutter pub get

You can learn more from the link below https://youtu.be/lxeB5ZZyJXM

if it happens to you during flutterfire configure command put it into your terminal to fix it:

dart pub global activate flutterfire_cli
Related