letsar / flutter_slidable

A Flutter implementation of slidable list item with directional slide actions.
MIT License
2.68k stars 575 forks source link

Error: A constant constructor can't call a non-constant super constructor. #483

Open dingzuhuaKone opened 1 month ago

dingzuhuaKone commented 1 month ago

../../../.pub-cache/hosted/pub.flutter-io.cn/flutter_slidable-3.1.1/lib/src/flex_entrance_transition.dart:8:9: Error: A constant constructor can't call a non-constant super constructor. const FlexEntranceTransition({ ^ ../../../.pub-cache/hosted/pub.flutter-io.cn/flutter_slidable-3.1.1/lib/src/flex_exit_transition.dart:8:9: Error: A constant constructor can't call a non-constant super constructor. const FlexExitTransition({ ^ Target kernel_snapshot failed: Exception

FAILURE: Build failed with an exception.

flutter doctor

Doctor summary (to see all details, run flutter doctor -v): [!] Flutter (Channel unknown, 3.7.5, on macOS 14.5 23F79 darwin-arm64, locale zh-Hans-CN) ! Flutter version 3.7.5 on channel unknown at /Users/dingzuhua/workspace/flutter Currently on an unknown channel. Run flutter channel to switch to an official channel. If that doesn't fix the issue, reinstall Flutter by following instructions at https://flutter.dev/docs/get-started/install. ! Unknown upstream repository. Reinstall Flutter by following instructions at https://flutter.dev/docs/get-started/install. [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0-rc1) [✓] Xcode - develop for iOS and macOS (Xcode 15.4) [✓] Chrome - develop for the web [✓] Android Studio (version 2021.2) [✓] VS Code (version 1.91.0) [!] Proxy Configuration ! NO_PROXY is not set [✓] Connected device (3 available) ! Error: Browsing on the local area network for 丁祖华的手机. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac. The device must be opted into Developer Mode to connect wirelessly. (code -27) ! Error: Browsing on the local area network for iPhone. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac. The device must be opted into Developer Mode to connect wirelessly. (code -27) [✓] HTTP Host Availability

! Doctor found issues in 2 categories.

dingzuhuaKone commented 1 month ago

Version 3.1.0 is normal.

letsar commented 1 month ago

Oh ok sorry, I should have created a major version since the const constructor of MultiChildRenderObjectWidget is not in Flutter 3.7. You can either stick to the previous version of Slidable or update Flutter to at least 3.10.0