Configuration Used
- Architecture: Clean Architecture & Feature-first structure
-
- State Management: GetX, GetX Routing, GetX Bindings
-
-
-
-
-
-
- Localization: easy_localization (default-bundled)
Description of Issues Found
1. Ambiguous Exports and Naming Conflicts
When packages_imports.dart exports package:get/get.dart (or when sub-packages are exported alongside dio and easy_localization), name collisions occur:
- BuildContext Extension Collision (
theme property): Both GetX's navigation extension (ContextExtensionss) and the custom generated ContextExtension in lib/src/extensions/context_extension.dart define theme.
-
- String Extension Collision (
tr method): Both GetX's translation extension (Trans) and easy_localization's extension (StringTranslateExtension) define the tr() method.
-
-
- Class Collisions:
FormData, MultipartFile, and Response are defined in both package:dio/dio.dart and package:get/get.dart (via its HTTP module).
Fix: Update the GetX export statement in lib/src/imports/packages_imports.dart to:
export 'package:get/get.dart' hide ContextExtensionss, Trans, StringExtension, FormData, MultipartFile, Response;
2. Invalid Import Paths for AuthController
The generated screens and binding files attempt to import AuthController from controllers/auth_controller.dart, but the file is generated in the providers directory:
- Correct path:
package:atmadarshan/src/features/auth/presentation/providers/auth_controller.dart
-
- Generated import:
package:atmadarshan/src/features/auth/presentation/controllers/auth_controller.dart
This causes compilation failures in:
lib/src/features/auth/presentation/screens/signup_screen.dart
-
lib/src/features/auth/presentation/screens/login_screen.dart
-
-
lib/src/features/auth/presentation/screens/forgot_password_screen.dart
-
-
-
lib/src/routing/app_bindings.dart
Fix: Change the generated imports to point to providers/.
3. Strict Type Inference Warnings
With strict analysis options enabled, calling GetX navigation methods without specifying explicit type parameters raises warnings because the return types cannot be inferred.
Fix: Add explicit <dynamic> type arguments:
Get.toNamed<dynamic>(AppRoutes.forgotPassword);
Get.offAllNamed<dynamic>(AppRoutes.home);
And GetPage<dynamic> type arguments for AppRouter.getPages.
4. HugeIcons Rendering and Type Mismatch
AppIcon in lib/src/shared/widgets/app_icon.dart is typed as accepting IconData, but layouts pass HugeIcons.strokeRoundedHome01 which has a type of List<List<dynamic>>.
-
- The generator outputs
HugeIcons.strokeRoundedTickCircle in show_toast.dart, which does not exist in hugeicons: ^1.1.5 (the correct name is HugeIcons.strokeRoundedCheckmarkCircle01).
Fix: Update AppIcon to accept dynamic and dynamically render either standard Icon or HugeIcon.
5. Missing Configuration Assets in pubspec.yaml
pubspec.yaml registers .env and assets/images/ as assets, but they are not created by default.
Fix: The generator should output an empty .env file and create the assets/images/ directory with a .gitkeep placeholder.
Configuration Used
Description of Issues Found
1. Ambiguous Exports and Naming Conflicts
When
packages_imports.dartexportspackage:get/get.dart(or when sub-packages are exported alongsidedioandeasy_localization), name collisions occur:themeproperty): Both GetX's navigation extension (ContextExtensionss) and the custom generatedContextExtensioninlib/src/extensions/context_extension.dartdefinetheme.trmethod): Both GetX's translation extension (Trans) andeasy_localization's extension (StringTranslateExtension) define thetr()method.FormData,MultipartFile, andResponseare defined in bothpackage:dio/dio.dartandpackage:get/get.dart(via its HTTP module).Fix: Update the GetX export statement in
lib/src/imports/packages_imports.dartto:2. Invalid Import Paths for AuthController
The generated screens and binding files attempt to import
AuthControllerfromcontrollers/auth_controller.dart, but the file is generated in theprovidersdirectory:package:atmadarshan/src/features/auth/presentation/providers/auth_controller.dartpackage:atmadarshan/src/features/auth/presentation/controllers/auth_controller.dartThis causes compilation failures in:
lib/src/features/auth/presentation/screens/signup_screen.dartlib/src/features/auth/presentation/screens/login_screen.dartlib/src/features/auth/presentation/screens/forgot_password_screen.dartlib/src/routing/app_bindings.dartFix: Change the generated imports to point to
providers/.3. Strict Type Inference Warnings
With strict analysis options enabled, calling GetX navigation methods without specifying explicit type parameters raises warnings because the return types cannot be inferred.
Fix: Add explicit
<dynamic>type arguments:And
GetPage<dynamic>type arguments forAppRouter.getPages.4. HugeIcons Rendering and Type Mismatch
AppIconinlib/src/shared/widgets/app_icon.dartis typed as acceptingIconData, but layouts passHugeIcons.strokeRoundedHome01which has a type ofList<List<dynamic>>.HugeIcons.strokeRoundedTickCircleinshow_toast.dart, which does not exist inhugeicons: ^1.1.5(the correct name isHugeIcons.strokeRoundedCheckmarkCircle01).Fix: Update
AppIconto acceptdynamicand dynamically render either standardIconorHugeIcon.5. Missing Configuration Assets in
pubspec.yamlpubspec.yamlregisters.envandassets/images/as assets, but they are not created by default.Fix: The generator should output an empty
.envfile and create theassets/images/directory with a.gitkeepplaceholder.