assertValid method
Runs a dev-mode assertion that the definition is valid.
When assertions are enabled, throws StateError. Otherwise does nothing.
Implementation
@override
void assertValid() {
if (!isDevMode) {
return;
}
if (component == null) {
throw StateError('Must have a non-null `component` factory');
}
}