of static method
The closest RawSpacings instance that encloses the given context
.
If no ancestor is found, defaults to the defaultSpacings instance
Implementation
static RawSpacings of(BuildContext context) {
final resolverAncestor = context.dependOnInheritedWidgetOfExactType<SpacingsInheritedWidget>();
return resolverAncestor?.spacings ?? defaultSpacings;
}