MobilePurchaseMasamuneAdapter class
Initial setup for handling InAppPurchase on mobile MasamuneAdapter.
Define all billable items to be used in the app in products.
モバイルでのInAppPurchaseを取り扱うための初期設定を行うMasamuneAdapter。
productsにアプリ内で利用するすべての課金用のアイテムを定義してください。
- Inheritance
-
- Object
- MasamuneAdapter
- PurchaseMasamuneAdapter
- MobilePurchaseMasamuneAdapter
Constructors
-
MobilePurchaseMasamuneAdapter({required List<
PurchaseProduct> products, required String? onRetrieveUserId(), FunctionsAdapter? functionsAdapter, ModelAdapter? modelAdapter, bool automaticallyConsumeOnAndroid = true, bool iosSandboxTesting = false, Purchase? purchase, bool initializeOnBoot = false}) -
Initial setup for handling InAppPurchase on mobile
MasamuneAdapter.const
Properties
- automaticallyConsumeOnAndroid → bool
-
If you are using an Android device, set to
trueto automatically consume charged items.final - consumablePurchaseDelegate → ConsumablePurchaseDelegate?
-
Delegate to perform each process on the consumable purchase.
finalinherited
- functionsAdapter → FunctionsAdapter?
-
Specify
FunctionsAdapterfor billing validation.finalinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- initializeOnBoot → bool
-
trueif initialize is set totrueto start initialization when onMaybeBoot is executed.finalinherited - iosSandboxTesting → bool
-
Set to
trueif you want to debug with SandboxTesting if you are using an IOS terminal.final - isTest → bool
-
If this is
true, it indicates that test adapters are set inTestMasamuneAdapterScope.setTestAdaptersand it is in test mode.no setterinherited -
loggerAdapters
→ List<
LoggerAdapter> -
Adapters can be defined to add logger functionality.
no setterinherited
-
masamuneAdapters
→ List<
MasamuneAdapter> -
You can define adapters to add features to the Masamune Framework.
no setterinherited
- modelAdapter → ModelAdapter?
-
Default
ModelAdapterfor usingPurchaseSubscriptionModelandPurchaseUserModel.finalinherited -
Observers can be set up to monitor transitions between pages.
no setterinherited
- nonConsumablePurchaseDelegate → NonConsumablePurchaseDelegate?
-
Delegate to perform each process on the non-consumable purchase.
finalinherited
- onRetrieveUserId → String? Function()
-
Specify a callback in onRetrieveUserId that returns the unique ID of the user. If the user is not logged in, return Null.
finalinherited
- priority → double
-
The priority of the adapter.
no setterinherited
-
products
→ List<
PurchaseProduct> -
A list of all charged items used in the application.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- runZonedGuarded → bool
-
If you set this to
true, you can wrap runApp withrunZonedGuarded.no setterinherited - subscriptionPurchaseDelegate → SubscriptionPurchaseDelegate?
-
Delegate to perform each process on the subscription purchase.
finalinherited
Methods
-
getProducts(
{required String? onRetrieveUserId()}) → Future< List< PurchaseProduct> > -
Get the PurchaseProduct with its contents included.
override
-
initialize(
) → Future< void> -
Perform other initialization processes.
override
-
listenPurchase(
{required List< PurchaseProduct> products, required VoidCallback onDone, required VoidCallback onDisposed, required void onError(Object e, StackTrace? stacktrace)}) → StreamSubscription? -
Get callback on billing as a stream.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onBuildApp(
BuildContext context, Widget app) → Widget -
Widgets can be added during the build of
MasamuneApp.inherited -
onBuildPage(
BuildContext context, Widget page) → Widget -
Returning Widget will build the widget.
inherited
-
onError(
Object error, StackTrace stackTrace) → void -
You can describe the process when
runZonedGuardedis set totrue.inherited -
onInitScope(
MasamuneAdapter adapter) → void -
Called when initializing
MasamuneAdapterScope.inherited -
onMaybeBoot(
BuildContext context) → FutureOr< void> -
It may be called during application initialization.
inherited
-
onPreRunApp(
WidgetsBinding binding) → FutureOr< void> -
You can describe the process before runApp.
inherited
-
onRestarted(
) → FutureOr< void> -
It may be called when the application is restarted.
inherited
-
purchase(
{required PurchaseProduct product, required VoidCallback onDone, PurchaseProduct? replacedProduct}) → Future< void> -
Process the purchase of
product.override -
restore(
List< PurchaseProduct> products) → Future<void> -
Processes restoration of billing information.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited