CreateItemHandlerWidget class

CreateItemHandlerWidget is a self-contained widget that initializes the Finik SDK, creates a payment item (QR code), and handles payment tracking via services.

This widget is typically used to create a new payable item dynamically and show a full payment UI using QR code and deep link tracking out of the box.

Example usage:

CreateItemHandlerWidget(
  accountId: 'acc_123',
  nameEn: 'Premium Subscription',
  fixedAmount: 9.99,
  callbackUrl: 'https://yourapp.com/payment_callback',
  onBackPressed: () => Navigator.pop(context),
  onPayment: (result) => handlePaymentResult(result),
)

Internally, it initializes all required BLoCs and renders ItemView.

Inheritance

Constructors

CreateItemHandlerWidget.new({required String accountId, required String nameEn, Key? key, String? requestId, Amount? amount, String? description, String? callbackUrl, int? maxAvailableQuantity, double? maxAvailableAmount, DateTime? startDate, DateTime? endDate, VisibilityType? visibilityType = VisibilityType.PRIVATE, ActionLabelType? actionLabelType, List<MediaInput>? mediaFiles, List<RequiredField>? requiredFields})
Creates an instance of CreateItemHandlerWidget.
const

Properties

accountId String
Account ID to which the item is associated.
final
actionLabelType ActionLabelType?
Action label type. Visible only if FinikDeveloperConfig.onActionButtonPressed is not null.
final
amount Amount?
One of FixedAmount, MinMaxAmount, or FreeAmount.
final
callbackUrl String?
Optional callback URL to receive payment result.
final
description String?
Optional item description shown in UI.
final
endDate DateTime?
Optional end date when this item is no longer available for payment.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
maxAvailableAmount double?
Optional cap on total payable amount across all payments for this item.
final
maxAvailableQuantity int?
Optional cap on how many times the item can be paid for.
final
mediaFiles List<MediaInput>?
Optional list of media files (images, videos) associated with this item. Used for displaying visual content in the payment UI.
final
nameEn String
Name of the item. Displayed in the UI and used in receipt.
final
requestId String?
Optional unique request ID. Automatically generated if not provided.
final
requiredFields List<RequiredField>?
Optional additional required fields (e.g., phone, email).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
startDate DateTime?
Optional start date when this item becomes available for payment.
final
visibilityType VisibilityType?
Visibility type of the item (public, private).
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() FinikWidgetState<FinikWidget>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited