PrivacyPolicyPage class

Inheritance

Constructors

PrivacyPolicyPage({Key? key, List<String>? policyItems, List<PolicyItem>? policyItemsHierarchical, Widget? topIcon, Color? backgroundColor, String sharedPrefKey = 'app_prviacy_accept_data', String? privacyLink, String? termsLink, VoidCallback? onAccept, VoidCallback? onReject, Color? titleTextColor, Color? contentTextColor, Color? linkTextColor, String? policyVersion, String? locale, String fallbackLocale = 'en', PrivacyPolicyLocalization? localization, String? titleText, String? acceptText, String? rejectText, String? iosContinueText, String? privacyTitle, String? termsTitle, String? snackBarOpenLinkText, bool withoutExitButtonWhenIOSPlatform = false})
const

Properties

acceptText String?
final
backgroundColor Color?
final
contentTextColor Color?
final
fallbackLocale String
Fallback locale when target locale is not found Default: 'en'
final
hashCode int
The hash code for this object.
no setterinherited
iosContinueText String?
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
linkTextColor Color?
final
locale String?
Locale for displaying policy content and UI text If null, automatically detects from device locale Format: 'en', 'zh_TW', 'zh_CN', 'ja', etc.
final
localization PrivacyPolicyLocalization?
Custom localization for UI elements (buttons, titles, etc.) If null, uses built-in localizations based on locale
final
onAccept VoidCallback?
final
onReject VoidCallback?
final
policyItems List<String>?
final
policyItemsHierarchical List<PolicyItem>?
final
policyVersion String?
final
final
privacyTitle String?
final
rejectText String?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sharedPrefKey String
final
snackBarOpenLinkText String?
final
final
termsTitle String?
final
titleText String?
final
titleTextColor Color?
final
topIcon Widget?
final
withoutExitButtonWhenIOSPlatform bool
When true on iOS, hides the exit/reject button so users always continue to the system permission prompt. Has no effect on other platforms.
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

getAcceptedAt({String key = 'app_prviacy_accept_data'}) Future<DateTime?>
Get the time when user accepted privacy policy
getAcceptedVersion({String key = 'app_prviacy_accept_data'}) Future<String?>
Get the privacy policy version that user has accepted
getDeviceCountryCode() Future<String?>
Get device country/region code (estimation only)
getDeviceLocale() Future<String>
Get device locale string (e.g., 'en', 'zh_TW', 'zh_CN')
isAccepted({String key = 'app_prviacy_accept_data'}) Future<bool>
Check if privacy policy has been accepted (legacy API, maintains backward compatibility)
isAcceptedForVersion({required String currentPolicyVersion, String key = 'app_prviacy_accept_data'}) Future<bool>
Check if specific version of privacy policy has been accepted
setAccepted({String key = 'app_prviacy_accept_data'}) Future<void>
Set privacy policy as accepted (legacy API)
setAcceptedForVersion({required String policyVersion, String key = 'app_prviacy_accept_data'}) Future<void>
Set specific version of privacy policy as accepted
shouldShowPrivacyPage({required String? region, List<String>? skipRegionList, List<String>? onlyRegionList}) bool
Determine whether to show privacy page
shouldSkipPrivacyPage({required String? region, List<String>? skipRegionList, List<String>? onlyRegionList}) bool
Determine whether to skip privacy page (do not display)
shouldSkipPrivacyPageByDevice({List<String>? skipRegionList, List<String>? onlyRegionList}) Future<bool>
Automatically get device region and determine if privacy page should be skipped