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
- Object
- ChangeNotifier
- BaseModel
- ProfilePageViewModel
Constructors
Properties
bottomSheetHeight ↔ double
read / write
currentOrg ↔ OrgInfo
read / write
currentUser ↔ User
read / write
denomination → List<String>
final
donationAmount ↔ TextEditingController
read / write
donationCurrency ↔ String
read / write
donationCurrencySymbol ↔ String
read / write
donationField → FocusNode
final
hashCode → int
The hash code for this object.
read-onlyinherited
hasListeners → bool
Whether any listeners are currently registered.
read-onlyinherited
isBusy → bool
read-onlyinherited
organisation ↔ Box<OrgInfo>
latefinal
runtimeType → Type
A representation of the runtime type of the object.
read-onlyinherited
scaffoldKey → GlobalKey<ScaffoldState>
final
state → ViewState
read-onlyinherited
url ↔ Box
latefinal
user ↔ Box<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