of static method
The closest instance of the CustomSlidableController which controls this CustomSlidable that encloses the given context.
{@tool snippet} Typical usage is as follows:
CustomSlidableController controller = CustomSlidable.of(context);
{@end-tool}
Implementation
static CustomSlidableController? of(BuildContext context) {
final scope = context
.getElementForInheritedWidgetOfExactType<
_CustomSlidableControllerScope>()
?.widget as _CustomSlidableControllerScope?;
return scope?.controller;
}