PaymentViewModel class

Inheritance
Available extensions

Constructors

PaymentViewModel(String baseUrl, EndpointMode endpointMode)

Properties

actionUrl String
no setter
amountValidationMessage String?

Available on FormStateHelper, provided by the ValueProperties extension

no setter
amountValue String?

Available on FormStateHelper, provided by the ValueProperties extension

getter/setter pair
anyObjectsBusy bool
no setterinherited
baseUrl String
getter/setter pair
cardNumberValidationMessage String?

Available on FormStateHelper, provided by the ValueProperties extension

no setter
cardNumberValue String?

Available on FormStateHelper, provided by the ValueProperties extension

getter/setter pair
cvvValidationMessage String?

Available on FormStateHelper, provided by the ValueProperties extension

no setter
cvvValue String?

Available on FormStateHelper, provided by the ValueProperties extension

getter/setter pair
disposed bool
getter/setter pairinherited
endpointMode EndpointMode
getter/setter pair
expiryDateValidationMessage String?

Available on FormStateHelper, provided by the ValueProperties extension

no setter
expiryDateValue String?

Available on FormStateHelper, provided by the ValueProperties extension

getter/setter pair
fieldsValidationMessages Map<String, String?>
getter/setter pairinherited
formKey GlobalKey<FormState>
final
formValueMap Map<String, dynamic>
Stores the mapping of the form key to the value entered by the user
getter/setter pairinherited
hasAmount bool

Available on FormStateHelper, provided by the ValueProperties extension

no setter
hasAmountValidationMessage bool

Available on FormStateHelper, provided by the ValueProperties extension

no setter
hasAnyValidationMessage bool

Available on FormStateHelper, provided by the ValueProperties extension

no setter
hasCardNumber bool

Available on FormStateHelper, provided by the ValueProperties extension

no setter
hasCardNumberValidationMessage bool

Available on FormStateHelper, provided by the ValueProperties extension

no setter
hasCvv bool

Available on FormStateHelper, provided by the ValueProperties extension

no setter
hasCvvValidationMessage bool

Available on FormStateHelper, provided by the ValueProperties extension

no setter
hasError bool
Returns the error existence status of the ViewModel
no setterinherited
hasExpiryDate bool

Available on FormStateHelper, provided by the ValueProperties extension

no setter
hasExpiryDateValidationMessage bool

Available on FormStateHelper, provided by the ValueProperties extension

no setter
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
initialised bool
no setterinherited
isBusy bool
Returns the busy status of the ViewModel
no setterinherited
isFailed bool
getter/setter pair
isForm bool
getter/setter pair
isFormValid bool

Available on FormStateHelper, provided by the ValueProperties extension

no setter
isMastercard bool
getter/setter pair
isSuccess bool
getter/setter pair
isVisa bool
getter/setter pair
isWebView bool
getter/setter pair
listenableServices List<ListenableServiceMixin>
no setterinherited
modelError → dynamic
Returns the error status of the ViewModel
no setterinherited
onModelReadyCalled bool
no setterinherited
paymentFailedReason String
getter/setter pair
paymentModel PaymentModel
no setter
paymentReference String
getter/setter pair
reactiveServices List<ReactiveServiceMixin>
no setterinherited
returnUrl String
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showValidationMessage bool
no setterinherited
transactionInfoResponse TransactionInfoResponse?
getter/setter pair
validationMessage String?
no setterinherited
webViewController ↔ WebViewController
getter/setter pair

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
busy(Object? object) bool
Returns the busy status for an object if it exists. Returns false if not present
inherited
clearErrors() → void
Clears all the errors
inherited
clearForm() → void

Available on FormStateHelper, provided by the Methods extension

Clears text input fields on the Form
dispose() → void
Discards any resources used by the object.
inherited
encryptPaymentCard() Future<void>
error(Object object) → dynamic
inherited
getTransactionInfo() Future<void>
hasErrorForKey(Object key) bool
Returns a boolean that indicates if the ViewModel has an error for the key
inherited
init(String paymentRef) → void
initializeWebView() Future<void>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
onFutureError(dynamic error, Object? key) → void
Function that is called when a future throws an error
inherited
rebuildUi() → void
Calls the builder function with this updated viewmodel
inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
runBusyFuture<T>(Future<T> busyFuture, {Object? busyObject, bool throwException = false}) Future<T>
Sets the ViewModel to busy, runs the future and then sets it to not busy when complete.
inherited
runErrorFuture<T>(Future<T> future, {Object? key, bool throwException = false}) Future<T>
inherited
setAmountValidationMessage(String? validationMessage) → dynamic

Available on FormStateHelper, provided by the Methods extension

setBusy(bool value) → void
Marks the ViewModel as busy and calls notify listeners
inherited
setBusyForObject(Object? object, bool value) → void
Sets the busy state for the object equal to the value passed in and notifies Listeners If you're using a primitive type the value SHOULD NOT BE CHANGED, since Hashcode uses == value
inherited
setCardNumberValidationMessage(String? validationMessage) → dynamic

Available on FormStateHelper, provided by the Methods extension

setCvvValidationMessage(String? validationMessage) → dynamic

Available on FormStateHelper, provided by the Methods extension

setData(Map<String, dynamic> data) → void
inherited
setError(dynamic error) → void
Sets the error for the ViewModel
inherited
setErrorForModelOrObject(dynamic value, {Object? key}) → void
inherited
setErrorForObject(Object object, dynamic value) → void
Sets the error state for the object equal to the value passed in and notifies Listeners If you're using a primitive type the value SHOULD NOT BE CHANGED, since Hashcode uses == value
inherited
setExpiryDateValidationMessage(String? validationMessage) → dynamic

Available on FormStateHelper, provided by the Methods extension

setFormStatus() → void
Called after the formValueMap has been updated and allows you to set values relating to the forms status.
inherited
setInitialised(bool value) → void
Sets the initialised value for the ViewModel to true. This is called after the first initialise special ViewModel call
inherited
setOnModelReadyCalled(bool value) → void
Sets the onModelReadyCalled value to true. This is called after this first onModelReady call
inherited
setValidationMessage(String? value) → void
inherited
setValidationMessages(Map<String, String?> validationMessages) → void
inherited
skeletonData<T>({required T? realData, required T busyData, Object? busyKey}) → T
returns real data passed if neither the model is busy nor the object passed is busy
inherited
toString() String
A string representation of this object.
inherited
trackPaymentRequest() Future<void>
updateAmount(String amount) → void
updateCardNumber(String cardNumber) → void
updateCVV(String cvv) → void
updateExpiryDate(String expiryDate) → void
validateForm() → void

Available on FormStateHelper, provided by the Methods extension

Validates text input fields on the Form

Operators

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