Skip to main content

ProfilePageViewModel class

ProfilePageViewModel class helps to interact with model to serve data and react to user's input in Profile Page view.

Methods include:

  • logout

Inheritance

Constructors

ProfilePageViewModel ()

Properties

bottomSheetHeightdouble

read / write

currentOrgOrgInfo

read / write

currentUserUser

read / write

denominationList<String>

final

donationAmountTextEditingController

read / write

donationCurrencyString

read / write

donationCurrencySymbolString

read / write

donationFieldFocusNode

final

hashCodeint

The hash code for this object.
read-onlyinherited

hasListenersbool

Whether any listeners are currently registered.
read-onlyinherited

isBusybool

read-onlyinherited

organisationBox<OrgInfo>

latefinal

runtimeTypeType

A representation of the runtime type of the object.
read-onlyinherited

scaffoldKeyGlobalKey<ScaffoldState>

final

stateViewState

read-onlyinherited

urlBox

latefinal

userBox<User>

latefinal

Methods

addListener(VoidCallback listener) void

Register a closure to be called when the object changes.
inherited

attachListener(Function setter) void
changeCurrency(BuildContext context, Function setter) void

This method changes the currency of the user for donation purpose.

dispose() void

Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
inherited

dominationButton(String amount, BuildContext context, Function setter) Widget

This widget returns button for domination.

iconButton(Widget icon, Function onTap) Widget

This widget returns the button for social media sharing option.

initialize() void
invite(BuildContext context) void

This function generates the organization invitation link in a Dialog Box. Dialog box contains the QR-code of organization invite link and social media sharing options.

logout(BuildContext context) Future<void>

This method destroys the user's session or sign out the user from app. The function asks for the confimation in Custom Alert Dialog.

noSuchMethod(Invocation invocation) dynamic

Invoked when a non-existent method or property is accessed.
inherited

notifyListeners() void

Call all the registered listeners.
inherited

popBottomSheet() void
removeListener(VoidCallback listener) void

Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited

setState(ViewState viewState) void

inherited

showSnackBar(String message) void
toString() String

A string representation of this object.
inherited

updateSheetHeight() void

Operators

operator ==(Object other) bool

The equality operator.
inherited