get<C extends Controller> static method
Implementation
static C get<C extends Controller>({String? id}) {
if (id != null) {
for (dynamic c in _controllers.values) {
if (c.runtimeType.toString() == id) {
return c;
}
}
}
for (dynamic c in _controllers.values) {
if (c.runtimeType == C) {
return c;
}
}
dynamic c = BaseController();
return c;
}