forked from segmentio/analytics_flutter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
context.dart
61 lines (52 loc) · 1.03 KB
/
context.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import 'package:pigeon/pigeon.dart';
class NativeContext {
NativeContextApp? app;
NativeContextDevice? device;
NativeContextLibrary? library;
String? locale;
NativeContextNetwork? network;
NativeContextOS? os;
NativeContextScreen? screen;
String? timezone;
String? userAgent;
}
class NativeContextApp {
String? build;
String? name;
String? namespace;
String? version;
}
class NativeContextDevice {
String? id;
String? manufacturer;
String? model;
String? name;
String? type;
bool? adTrackingEnabled; // ios only
String? advertisingId; // ios only
String? trackingStatus;
String? token;
}
class NativeContextLibrary {
String? name;
String? version;
}
class NativeContextOS {
String? name;
String? version;
}
class NativeContextNetwork {
bool? cellular;
bool? wifi;
bool? bluetooth;
}
class NativeContextScreen {
int? height;
int? width;
double? density; // android only
}
@HostApi()
abstract class NativeContextApi {
@async
NativeContext getContext(bool collectDeviceId);
}