You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.24.1, on macOS 14.6.1 23G93 darwin-arm64, locale zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 16.0)
[✓] Android Studio (version 2024.1)
[✓] IntelliJ IDEA Community Edition (version 2023.2.6)
[✓] VS Code (version 1.93.1)
[✓] Connected device (2 available)
How to reproduce?
@FFAutoImport() annotation adds an alias to the generated import path for an enum, such as:
In some parts of the generated code, the alias is used, while in others it is not, causing type conversion errors. This issue is particularly noticeable when an enum (in this case, BusinessType) has a default value in the constructor, as shown below:
Use @FFAutoImport() to import an enum with a default value in its constructor.
Attempt to use the enum in various parts of the generated code.
Compile the project and observe the type conversion errors.
Expected Result: The generated import paths for enums, especially those with default values in constructors, should maintain consistency. Either all should have aliases or none, to avoid type errors.
Logs
No response
Example code (optional)
No response
Contact
No response
The text was updated successfully, but these errors were encountered:
zmtzawqlp
transferred this issue from fluttercandies/ff_annotation_route_core
Sep 26, 2024
Version
2.1.0
Platforms
dart
Device Model
Galaxy SM9550
flutter info
How to reproduce?
@FFAutoImport() annotation adds an alias to the generated import path for an enum, such as:
In some parts of the generated code, the alias is used, while in others it is not, causing type conversion errors. This issue is particularly noticeable when an enum (in this case, BusinessType) has a default value in the constructor, as shown below:
This inconsistency leads to compilation errors.
Steps to Reproduce:
Use @FFAutoImport() to import an enum with a default value in its constructor.
Attempt to use the enum in various parts of the generated code.
Compile the project and observe the type conversion errors.
Expected Result: The generated import paths for enums, especially those with default values in constructors, should maintain consistency. Either all should have aliases or none, to avoid type errors.
Logs
No response
Example code (optional)
No response
Contact
No response
The text was updated successfully, but these errors were encountered: