Context.fromNative constructor
Context.fromNative(
- NativeContext nativeContext,
- UserTraits traits
Implementation
Context.fromNative(NativeContext nativeContext, this.traits)
: app = nativeContext.app == null
? ContextApp("", "", "", "")
: ContextApp.fromNative(nativeContext.app as NativeContextApp),
device = nativeContext.device == null
? ContextDevice("", "", "", "")
: ContextDevice.fromNative(nativeContext.device as NativeContextDevice),
library = nativeContext.library == null
? ContextLibrary("", "")
: ContextLibrary.fromNative(nativeContext.library as NativeContextLibrary),
locale = nativeContext.locale ?? "",
network = nativeContext.network == null
? ContextNetwork(false, false)
: ContextNetwork.fromNative(nativeContext.network as NativeContextNetwork),
os = nativeContext.os == null
? ContextOS("", "")
: ContextOS.fromNative(nativeContext.os as NativeContextOS),
screen = nativeContext.screen == null
? ContextScreen(0, 0)
: ContextScreen.fromNative(nativeContext.screen as NativeContextScreen),
timezone = nativeContext.timezone ?? "";