findOtherController<T extends FindXController> method
T
findOtherController<
T extends FindXController>({ - String? id,
})
Implementation
@protected
T findOtherController<T extends FindXController>({String? id}) {
var name = (id == null) ? T.toString() : T.toString() + id;
if(_controllers == null)
throw "Can't find controller $name from ${this.runtimeType} because ${this.runtimeType} is not allowed to find other controllers.";
final controller = _controllers![name];
if (controller == null)
throw "Can't find controller $name, did you create it and put it in the tree?";
return _controllers![name] as T;
}