mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-22 07:20:39 +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,
|
||||
});
|
||||
|
||||
static ServicesProvider of(BuildContext context) {
|
||||
return context.findAncestorWidgetOfExactType<ServicesProvider>()!;
|
||||
static ServicesProvider of(BuildContext context) => ServicesProvider.maybeOf(context)!;
|
||||
|
||||
static ServicesProvider? maybeOf(BuildContext context) {
|
||||
return context.findAncestorWidgetOfExactType<ServicesProvider>();
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
@ -46,8 +46,8 @@ class ProFeaturesDialog extends StatelessWidget {
|
|||
FilledButton(
|
||||
onPressed: () {
|
||||
_close(context).then((_) {
|
||||
ServicesProvider.of(context)
|
||||
.analytics
|
||||
ServicesProvider.maybeOf(context)
|
||||
?.analytics
|
||||
.setCustomKey('iap_product_type', IAPProductType.paidFeatures.storeId);
|
||||
IAPProductsProvider.maybeOf(context)?.buy(IAPProductType.paidFeatures);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue