DraftModeUIPlatform class
Framework-owned platform style resolver for DraftMode widgets.
This is the single source of truth for choosing between iOS and Android rendering inside the framework. Consumers do not need to manually set a style to preserve the default iOS-first behavior on iOS hosts.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- isIOS → bool
-
Compatibility shim for legacy style checks outside a BuildContext.
no setter
Static Methods
-
isAndroidContext(
BuildContext context) → bool -
Returns whether the effective style for
contextresolves to Android. -
isIOSContext(
BuildContext context) → bool -
Returns whether the effective style for
contextresolves to iOS. -
resolveStyle(
[BuildContext? context]) → DraftModePlatformStyle -
Returns the effective platform style for
context. -
runWithStyleOverride<
T> (DraftModePlatformStyle style, FutureOr< T> action()) → Future<T> -
Executes
actionwith a temporary style override. -
styleForTargetPlatform(
TargetPlatform platform) → DraftModePlatformStyle - Maps Flutter host platforms into framework-owned visual styles.