of static method
Retrieves the nearest AdaptiFlowData from the widget tree.
Returns const AdaptiFlowData() (all defaults) if no AdaptiFlow ancestor is found. This ensures backward compatibility — the system works identically with or without an AdaptiFlow wrapper.
This creates a dependency: the calling widget rebuilds when config changes.
Implementation
static AdaptiFlowData of(BuildContext context) {
final widget = context.dependOnInheritedWidgetOfExactType<AdaptiFlow>();
return widget?.data ?? const AdaptiFlowData();
}