createTooltipController function
TooltipController
createTooltipController(
- @Optional.new() @SkipSelf.new() TooltipController controller,
- @Optional.new() Disposer disposer
)
Implementation
@Injectable()
TooltipController createTooltipController(
@Optional() @SkipSelf() TooltipController controller,
@Optional() Disposer disposer) {
// If TooltipController was bound higher up the tree use that instance. This
// allows an application to override the service at root.
if (controller != null) return controller;
if (_singletonController != null) return _singletonController!;
_singletonController = TooltipController();
disposer?.addFunction(() {
_singletonController = null;
});
return _singletonController!;
}