Skip to content

StoreProduct not exposed in public API of superwallkit_flutter #83

Open
@OrcunJoyoLabs

Description

@OrcunJoyoLabs

When implementing Superwall Delegate to log actions taken on paywalls, I noticed that the StoreProduct class is not properly exposed in the public API of superwallkit_flutter. This is causing issues when trying to access product information in delegate callbacks.

Current behavior

Currently, StoreProduct is only available by importing directly from the source directory:

import 'package:superwallkit_flutter/src/public/StoreProduct.dart'

Expected behavior

StoreProduct should be properly exported from the main package so it can be imported directly:

import 'package:superwallkit_flutter/superwallkit_flutter.dart'

Use case / Why this is needed

When implementing custom logging in delegate callbacks, we need access to the product information. For example:

case EventType.transactionComplete:
  final transaction = eventInfo.event.transaction;
  eventToLog = superwallTransactionComplete(
    paywallIdentifier: paywallIdentifier,
    productId: product?.productIdentifier,
    transactionId: transaction?.storeTransactionId,
  );

Having to import directly from the source directory (src/public) is not a sustainable solution as it relies on internal package structure that may change in future versions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions