requestsSeparateWindowsImpl property
True when the annotation spells Windows's implementation using the
SPECIFIC WindowsNativeImpl.cpp marker rather than the generic
NativeImpl.cpp shorthand. Both resolve to the identical CppImpl
singleton at the type level (see nitro_annotations/lib/src/annotations.dart) —
this distinction only exists in the SOURCE TEXT, which is exactly what
this (link-time, regex-based) analyzer reads.
Used as an explicit, opt-in request for Windows to get its own
windows/src/Hybrid<Class>.cpp instead of sharing src/Hybrid<Class>.cpp
with Linux/Android — see hasCustomPlatformImpl for the other (implicit,
file-content-driven) way to reach the same outcome. Writing the
per-platform type name is already nitro_annotations' "recommended"
style for clarity; this makes choosing it also mean "this platform may
diverge," which a plugin author reads for immediately rather than
having to have already written platform-specific code for it to apply.
Implementation
bool get requestsSeparateWindowsImpl => RegExp(
r'\bwindows\s*:\s*WindowsNativeImpl\.cpp\b',
).hasMatch(_annotation);