getController<Con extends Controller> static method
Retrieves a Controller from the widget tree if one exists Can be used in widgets that exist in pages and need to use the same controller
Implementation
static Con getController<Con extends Controller>(BuildContext context,
{bool listen = true}) {
return Provider.of<Con>(context, listen: listen);
}