validate method
Implementation
void validate(ConnectorElement connector) {
final provider = providers[connector.route];
if (provider == null) {
if (connector.route != ConnectorRoute.straight) {
throw StateError(
'Unregistered connector route: ${connector.route.name}',
);
}
if (connector.routedPoints.isNotEmpty || connector.preserveRoute) {
throw StateError('Straight routes do not retain authored waypoints.');
}
}
if (connector.routeOptions.isNotEmpty) {
optionsOf(connector.route).validate(connector);
}
capabilitiesOf(connector.route).validator?.validate(connector);
}