resolveStyle static method

DraftModePlatformStyle resolveStyle([
  1. BuildContext? context
])

Returns the effective platform style for context.

Resolution order:

  1. DraftModePlatformScope override from the widget tree
  2. temporary override configured via runWithStyleOverride
  3. 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);
}