getState static method
Implementation
static ComponentViewState? getState(BuildContext context) {
if (context is StatefulElement && context.state is ComponentViewState) {
return (context.state as ComponentViewState);
}
return context.findAncestorStateOfType<ComponentViewState>();
}