mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-22 23:40:41 +00:00
fixed showBuyProDialog
test
This commit is contained in:
parent
40e4340bc9
commit
4425c47b69
2 changed files with 6 additions and 4 deletions
|
@ -31,8 +31,10 @@ class ServicesProvider extends InheritedWidget {
|
||||||
required super.child,
|
required super.child,
|
||||||
});
|
});
|
||||||
|
|
||||||
static ServicesProvider of(BuildContext context) {
|
static ServicesProvider of(BuildContext context) => ServicesProvider.maybeOf(context)!;
|
||||||
return context.findAncestorWidgetOfExactType<ServicesProvider>()!;
|
|
||||||
|
static ServicesProvider? maybeOf(BuildContext context) {
|
||||||
|
return context.findAncestorWidgetOfExactType<ServicesProvider>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
@ -46,8 +46,8 @@ class ProFeaturesDialog extends StatelessWidget {
|
||||||
FilledButton(
|
FilledButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
_close(context).then((_) {
|
_close(context).then((_) {
|
||||||
ServicesProvider.of(context)
|
ServicesProvider.maybeOf(context)
|
||||||
.analytics
|
?.analytics
|
||||||
.setCustomKey('iap_product_type', IAPProductType.paidFeatures.storeId);
|
.setCustomKey('iap_product_type', IAPProductType.paidFeatures.storeId);
|
||||||
IAPProductsProvider.maybeOf(context)?.buy(IAPProductType.paidFeatures);
|
IAPProductsProvider.maybeOf(context)?.buy(IAPProductType.paidFeatures);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue