resolveStyle static method
Returns the effective platform style for context.
Resolution order:
- DraftModePlatformScope override from the widget tree
- temporary override configured via runWithStyleOverride
- host defaultTargetPlatform mapped into framework styles
Implementation
static DraftModePlatformStyle resolveStyle([BuildContext? context]) {
final DraftModePlatformStyle? scopedStyle =
context == null ? null : DraftModePlatformScope.maybeStyleOf(context);
return scopedStyle ??
_debugStyleOverride ??
styleForTargetPlatform(defaultTargetPlatform);
}