amap_privacy_statement.dart
1.69 KB
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
part of csp_amap_flutter_base;
///高德开放平台用户隐私声明配置
///
///高德SDK合规使用方案请参考:https://lbs.amap.com/news/sdkhgsy
class AMapPrivacyStatement {
/// 隐私权政策是否包含高德开平隐私权政策
final bool? hasContains;
/// 隐私权政策是否弹窗展示告知用户
final bool? hasShow;
/// 隐私权政策是否已经取得用户同意
final bool? hasAgree;
///构造AMapPrivacyStatement
///
///[hasContains] 隐私权政策是否包含高德开平隐私权政策
///
///[hasShow] 隐私权政策是否弹窗展示告知用户
///
///[hasAgree] 隐私权政策是否已经取得用户同意
const AMapPrivacyStatement(
{this.hasContains = false, this.hasShow = false, this.hasAgree = false});
dynamic toMap() {
final Map<String, dynamic> json = <String, dynamic>{};
void addIfPresent(String fieldName, dynamic value) {
if (value != null) {
json[fieldName] = value;
}
}
addIfPresent('hasContains', hasContains);
addIfPresent('hasShow', hasShow);
addIfPresent('hasAgree', hasAgree);
return json;
}
@override
bool operator ==(Object other) {
if (identical(this, other)) return true;
if (runtimeType != other.runtimeType) return false;
final AMapPrivacyStatement typedOther = other as AMapPrivacyStatement;
return hasContains == typedOther.hasContains &&
hasShow == typedOther.hasShow &&
hasAgree == typedOther.hasAgree;
}
@override
int get hashCode => Object.hashAll([hasContains, hasShow, hasAgree]);
@override
String toString() {
return 'AMapPrivacyStatement(hasContains: $hasContains, hasShow: $hasShow, hasAgree: $hasAgree)';
}
}