Error: Not a constant expression With updating XCode 12.3

Issue #20 resolved
Ekrem Cihad ÇETİN created an issue

After Updating MacOs BigSur Version 11.1, I updated XCode too 12.3(12C33). I tried to sign my application and lots of problems occur. I am using the new build system (legacy is deprecated, not recommended)
I am using flutter_treeview: ^0.6.0+1
I tried to ‘flutter clean’ and after 'flutter build ios'.

flutter --version 
Flutter 1.22.5  channel stable  https://github.com/flutter/flutter.git
Framework  revision 7891006299 (11 days ago)  2020-12-10 11:54:40 -0800
Engine  revision ae90085a84
Tools  Dart 2.10.444

flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[] Flutter (Channel stable, 1.22.5, on macOS 11.1 20C69 darwin-x64, locale
    en-TR)

[] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[] Xcode - develop for iOS and macOS (Xcode 12.3)
[] Android Studio (version 4.0)
[] IntelliJ IDEA Ultimate Edition (version 2018.3)
[] VS Code (version 1.48.0)
[] Connected device (2 available)

../../flutter/.pub-cache/hosted/pub.dartlang.org/flutter_treeview-0.6.0+1/lib/src/models/node_icon.dart:83:9: Error: Not a constant expression.
codePoint,
^^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/flutter_treeview-0.6.0+1/lib/src/models/node_icon.dart:84:21: Error: Not a constant expression.
fontFamily: fontFamily,
^^^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/flutter_treeview-0.6.0+1/lib/src/models/node_icon.dart:85:22: Error: Not a constant expression.
fontPackage: fontPackage,
^^^^^^^^^^^
../../flutter/.pub-cache/hosted/pub.dartlang.org/flutter_treeview-0.6.0+1/lib/src/models/node_icon.dart:82:29: Error: Constant evaluation error:
IconData get icon =>const IconData(
^
../../flutter/.pub-cache/hosted/pub.dartlang.org/flutter_treeview-0.6.0+1/lib/src/models/node_icon.dart:83:9: Context: Not a constant expression.
codePoint,

Comments (4)

  1. Kevin Armstrong

    Hi Chad. This actually is a duplicate of another issue #15. It occurred when flutter introduced icon treeshaking. I haven't had time to resolve this but in the meantime you can use the following command.

    flutter build ios --no-tree-shake-icons

  2. Log in to comment