mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-26 01:10:39 +00:00
log product id for IAP errors
This commit is contained in:
parent
210de80bd7
commit
4bfbf5d4fd
4 changed files with 16 additions and 1 deletions
|
@ -49,4 +49,6 @@ class LightmeterAnalytics {
|
||||||
information: information,
|
information: information,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<void> setCustomKey(String key, String value) async => _api.setCustomKey(key, value);
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,4 +10,6 @@ abstract class ILightmeterAnalyticsApi {
|
||||||
dynamic reason,
|
dynamic reason,
|
||||||
Iterable<Object> information = const [],
|
Iterable<Object> information = const [],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Future<void> setCustomKey(String key, String value);
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,4 +39,9 @@ class LightmeterAnalyticsFirebase implements ILightmeterAnalyticsApi {
|
||||||
fatal: true,
|
fatal: true,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<void> setCustomKey(String key, String value) async {
|
||||||
|
await FirebaseCrashlytics.instance.setCustomKey(key, value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:lightmeter/generated/l10n.dart';
|
import 'package:lightmeter/generated/l10n.dart';
|
||||||
|
import 'package:lightmeter/providers/services_provider.dart';
|
||||||
import 'package:lightmeter/res/dimens.dart';
|
import 'package:lightmeter/res/dimens.dart';
|
||||||
import 'package:lightmeter/screens/metering/components/shared/readings_container/components/shared/animated_dialog_picker/components/animated_dialog/widget_dialog_animated.dart';
|
import 'package:lightmeter/screens/metering/components/shared/readings_container/components/shared/animated_dialog_picker/components/animated_dialog/widget_dialog_animated.dart';
|
||||||
import 'package:lightmeter/screens/shared/transparent_dialog/widget_dialog_transparent.dart';
|
import 'package:lightmeter/screens/shared/transparent_dialog/widget_dialog_transparent.dart';
|
||||||
|
@ -44,7 +45,12 @@ class ProFeaturesDialog extends StatelessWidget {
|
||||||
),
|
),
|
||||||
FilledButton(
|
FilledButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
_close(context).then((_) => IAPProductsProvider.maybeOf(context)?.buy(IAPProductType.paidFeatures));
|
_close(context).then((_) {
|
||||||
|
ServicesProvider.of(context)
|
||||||
|
.analytics
|
||||||
|
.setCustomKey('iap_product_type', IAPProductType.paidFeatures.storeId);
|
||||||
|
IAPProductsProvider.maybeOf(context)?.buy(IAPProductType.paidFeatures);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
child: Text(S.of(context).unlock),
|
child: Text(S.of(context).unlock),
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in a new issue