of static method
Returns the Ditto
instance registered inside the current
context
Implementation
static Ditto of(BuildContext context) {
final temp = context.findAncestorWidgetOfExactType<InheritedDitto>();
assert(
temp != null,
'Have you added InheritedDitto at the root of your tree?',
);
return temp!._ditto;
}