trackPurchase method
- TrackPurchaseParameters parameters
Records the user purchase.
Implementation
Future<void> trackPurchase(TrackPurchaseParameters parameters) async {
if (!FWGlobalState.getInstance().sdkInitSucceeded) {
await FWGlobalState.getInstance().sdkInitSucceededFuture;
}
final nativeMethodName = FireworkSDKNativeMethodName.trackPurchase.name;
FWMethodChannelUtil.getFirewokSDKChannel().invokeMethod(
nativeMethodName, TrackPurchaseParametersUtil.toJson(parameters));
}