PDPAReaderScreen constructor
const
PDPAReaderScreen({
- Key? key,
- required String title,
- String? url,
- String? htmlString,
- double requiredScrollPercentage = 95.0,
- VoidCallback? onScrolledToBottom,
- VoidCallback? onAccept,
- VoidCallback? onDecline,
Implementation
const PDPAReaderScreen({
super.key,
required this.title,
this.url,
this.htmlString,
this.requiredScrollPercentage = 95.0, // Default to 95%
this.onScrolledToBottom,
this.onAccept,
this.onDecline,
}) : assert(
url != null || htmlString != null,
'Either url or htmlString must be provided.',
),
assert(
url == null || htmlString == null,
'Cannot provide both url and htmlString.',
),
assert(
requiredScrollPercentage > 0 && requiredScrollPercentage <= 100,
'requiredScrollPercentage must be between 0 and 100.',
);