fix:优化和对齐版本
This commit is contained in:
1 parent
364fc837b3
commit
bd6bb0ffce
115 files changed
+155
-3647
No files matched your search
@@ -0,0 +1,45 @@
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:jinzhi_flutter_app/common/privacy/privacy_gate.dart';
|
||||
|
||||
void main() {
|
||||
group('requiresAndroidPrivacyConsent', () {
|
||||
test('requires consent only for an Android native app without consent', () {
|
||||
expect(
|
||||
requiresAndroidPrivacyConsent(
|
||||
isWeb: false,
|
||||
platform: TargetPlatform.android,
|
||||
privacyAgreed: false,
|
||||
),
|
||||
isTrue,
|
||||
);
|
||||
});
|
||||
|
||||
test('does not block Android after consent or non-Android targets', () {
|
||||
expect(
|
||||
requiresAndroidPrivacyConsent(
|
||||
isWeb: false,
|
||||
platform: TargetPlatform.android,
|
||||
privacyAgreed: true,
|
||||
),
|
||||
isFalse,
|
||||
);
|
||||
expect(
|
||||
requiresAndroidPrivacyConsent(
|
||||
isWeb: false,
|
||||
platform: TargetPlatform.iOS,
|
||||
privacyAgreed: false,
|
||||
),
|
||||
isFalse,
|
||||
);
|
||||
expect(
|
||||
requiresAndroidPrivacyConsent(
|
||||
isWeb: true,
|
||||
platform: TargetPlatform.android,
|
||||
privacyAgreed: false,
|
||||
),
|
||||
isFalse,
|
||||
);
|
||||
});
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user