decode static method

NativeContext decode(
  1. Object result
)

Implementation

static NativeContext decode(Object result) {
  result as List<Object?>;
  return NativeContext(
    app: result[0] != null
        ? NativeContextApp.decode(result[0]! as List<Object?>)
        : null,
    device: result[1] != null
        ? NativeContextDevice.decode(result[1]! as List<Object?>)
        : null,
    library: result[2] != null
        ? NativeContextLibrary.decode(result[2]! as List<Object?>)
        : null,
    locale: result[3] as String?,
    network: result[4] != null
        ? NativeContextNetwork.decode(result[4]! as List<Object?>)
        : null,
    os: result[5] != null
        ? NativeContextOS.decode(result[5]! as List<Object?>)
        : null,
    screen: result[6] != null
        ? NativeContextScreen.decode(result[6]! as List<Object?>)
        : null,
    timezone: result[7] as String?,
    userAgent: result[8] as String?,
  );
}