showUnlockFeatureDialog function
Future<void>
showUnlockFeatureDialog(
- BuildContext context, {
- required AppTheme theme,
- required ProductDetails product,
- String? message,
- Color? barrierColor = Colors.black54,
- Color? backgroundColor = Colors.white,
- void onPurchasePressed()?,
- void onClosePressed()?,
Shows an "unlock feature" dialog for in-app purchases.
product
contains purchase details.
Optional styling and callbacks allow customization.
Implementation
Future<void> showUnlockFeatureDialog(
BuildContext context, {
required AppTheme theme,
required ProductDetails product,
String? message,
Color? barrierColor = Colors.black54,
Color? backgroundColor = Colors.white,
void Function()? onPurchasePressed,
void Function()? onClosePressed,
}) {
return showDialogWithAnimation<void>(
barrierColor: barrierColor,
context: context,
child: UnlockFeatureDialog(
onClosePressed: onClosePressed,
onPurchasePressed: onPurchasePressed,
theme: theme,
),
);
}