discovery library
RESOLVED discovery of preview entries in a target project's lib/.
ONE mechanism for every annotation: the generated test re-instantiates
the annotation (const Preview(...) / const MySubclass(...)) and
applies its fields — ALL of them, theme and localizations included — at
runtime, exactly like the official previewer. Annotation arguments are
constant expressions by Dart's rules, so every identifier they mention
resolves to an importable declaration; discovery rewrites the argument
source with import markers the generator turns into prefixes.
Also discovered: bare mounts (public widgets, transitively detected,
with a no-required-param default constructor and no entry of their own)
and missing-entry obligations. InheritedWidgets are supplies, never
subjects. The target must be resolvable (pub get has run).
Classes
Functions
-
discoverEntries(
String projectRoot) → Future< List< PreviewEntry> > -
packageNameOf(
String projectRoot) → String?