refactor: clean up unused code and fix all analyzer warnings

- Removed all unused imports and variables across generator sources and tests
- Applied Dart 3 super parameters to all custom exceptions
- Project now passes 'dart analyze' with zero warnings or infos
- All tests (164/164) are green

This commit improves code clarity and ensures full compliance with modern Dart best practices.
This commit is contained in:
Sergey Penkovsky
2025-07-15 16:28:05 +03:00
parent 71d3ef77a9
commit edc2a14ad7
5 changed files with 24 additions and 52 deletions

View File

@@ -13,8 +13,8 @@
import 'dart:async';
import 'package:analyzer/dart/constant/value.dart';
import 'package:analyzer/dart/element/nullability_suffix.dart';
import 'package:analyzer/dart/element/type.dart';
import 'package:build/build.dart';
import 'package:source_gen/source_gen.dart';
import 'package:analyzer/dart/element/element.dart';
@@ -85,9 +85,6 @@ class InjectGenerator extends GeneratorForAnnotation<ann.injectable> {
final className = classElement.name;
final mixinName = '_\$$className';
// Get the source file name for the part directive
final sourceFile = classElement.source.shortName;
// Collect and process all @inject fields.
final injectFields = classElement.fields
.where(_isInjectField)