builder library
OPTIONAL, advanced alternative to dart run white_label_kit:generate
(see bin/generate.dart — that's the primary, recommended path, the
same way flutter_native_splash:create/icons_launcher:create work:
one direct command, no build_runner involved). If your project already
runs dart run build_runner build for freezed/json_serializable/
injectable_generator, this lets that same command also regenerate
lib/white_label.g.dart — but it requires a build.yaml sources:
override (white_label.yaml sits at the project root, outside
build_runner's default lib/** scan) that generate/init do not.
Both paths call the exact same generation logic
(lib/src/generation/dart_config_generator.dart) — pick whichever fits
your project, they produce identical output.
Registered via build.yaml's white_label_generator entry —
auto_apply: none, so a consumer must explicitly enable it in their own
build.yaml (alongside the sources: override mentioned above). This
is deliberately NOT auto-applied the way freezed_annotation auto-
applies freezed: a consumer without the sources: override would
have this builder activate anyway, never find its unreachable
white_label.yaml input, and still have build_runner treat
lib/white_label.g.dart as an output it owns — deleting the real file
dart run white_label_kit:generate/:configure had already written,
on the very next build_runner build. See build.yaml's comment for
this exact, previously-observed incident.
Classes
- WhiteLabelBuilder
-
See this library's dartdoc — a thin
build_runnerwrapper around generateWhiteLabelSource/resolveGeneratorTenantId, for projects that prefer triggering generation viabuild_runnerinstead of the directgenerateCLI command.
Functions
-
whiteLabelBuilder(
BuilderOptions options) → Builder -
Builder factory registered via
build.yaml'swhite_label_generator.