native_workmanager_gen 1.0.4
native_workmanager_gen: ^1.0.4 copied to clipboard
Code generator for native_workmanager. Generates type-safe DartWorker callback IDs and worker registry from @WorkerCallback annotations.
1.0.4 #
- Widen
analyzerconstraint from^12.0.0to>=10.0.0 <13.0.0so that Flutter projects whose SDK pinsmetato1.17.0(e.g. Flutter 3.41.x) can resolve the dependency without conflict —analyzer 10.xrequiresmeta ^1.15.0which satisfies the pin. - Fix deprecation: replace
getDisplayString(withNullability: false)withgetDisplayString()(thewithNullabilityparameter was deprecated across all supported analyzer versions).
1.0.3 #
- Require analyzer
>=12.0.0and Dart SDK>=3.9.0to match pub.dev analysis environment and gain access to stable analyzer 12.x APIs. - Replace
FunctionElement(removed in analyzer 12.x / Dart 3.11+) withElementKind.FUNCTIONcheck andTopLevelFunctionElementcast. - Replace
element.parameters(renamed toformalParametersin analyzer 12.x) withfn.formalParametersthroughout validation logic. - Replace
element.name(nowString?in analyzer 12.x) withelement.displayName(always non-nullString) throughout. - Drop redundant
enclosingElement is! LibraryElementguard — annotated top-level functions always satisfykind == ElementKind.FUNCTION.
1.0.2 #
- Replace
TypeChecker.fromRuntime(removed in source_gen 4.x) withTypeChecker.fromUrl— removesdart:mirrorsdependency and fixes static analysis on pub.dev. - Remove
native_workmanagerfrom runtime dependencies (only needed at build time via URI).
1.0.1 #
- Widen dependency constraints:
build <5,source_gen <5,analyzer <13,build_runner <4. - Add dartdoc to
workerCallbackBuilderandWorkerCallbackGeneratorconstructor. - Add example demonstrating codegen setup.
1.0.0 #
- Initial release:
@WorkerCallbackannotation code generator fornative_workmanager. - Generates type-safe callback IDs and worker registry from annotated top-level functions.
- Validates callback signature (
Future<bool>return type,String?parameter).