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

fix "A constant constructor can't call a non-constant super constructor." error #491

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ryan-yuan-dev
Copy link

Working Environment:

Flutter 3.7.12-ohos • channel unknown • unknown source
Framework • revision acd9aa9121 (35 hours ago) • 2024-08-06 10:37:13 +0800
Engine • revision 1a65d409c7
Tools • Dart 2.19.6 • DevTools 2.20.1

When integrating the library into the project and running it, the A constant constructor can't call a non-constant super constructor. error reported. It's easy to fix. Just remove const from the FlexExitTransition and FlexEntranceTransition classes.

Fix "A constant constructor can't call a non-constant super constructor." error
fix "A constant constructor can't call a non-constant super constructor." error.
@ryan-yuan-dev
Copy link
Author

Although the problem is solved, this is not a good solution. A better way is to limit the Flutter SDK version in the pubspec.yaml. MultiChildRenderObjectWidget is not const in version 3.7.12, but it is in version 3.22.1.

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

Successfully merging this pull request may close these issues.

1 participant