Skip to main content

CreateEventViewModel class

CreateEventViewModel class have methods to interact with model in.

the context of creating the event in the organization.

Methods include:

  • createEvent : to create an event.
  • getImageFromGallery : to select image for a post.
  • removeImage : to remove the image.
  • getCurrentOrgUsersList : to get all user list of current organization.
  • removeUserFromList : to remove a user from list.

Inheritance

Constructors

CreateEventViewModel ()

Properties

descriptionFocusFocusNode

DescriptionFocus FocusNode.
read / write

eventDescriptionTextControllerTextEditingController

Event Description Text Controller.
read / write

eventEndDateDateTime

Event End Date.
read / write

eventEndTimeTimeOfDay

Event End Time.
read / write

eventLocationTextControllerTextEditingController

Event Location Text Controller.
read / write

eventStartDateDateTime

Event Start Date.
read / write

eventStartTimeTimeOfDay

Event Start Time.
read / write

eventTitleTextControllerTextEditingController

Event Title Text Controller.
read / write

formKeyGlobalKey<FormState>

Global FormKey.
final

hashCodeint

The hash code for this object.
read-onlyinherited

hasListenersbool

Whether any listeners are currently registered.
read-onlyinherited

imageFileFile?

Getter to return imageFile.
read-only

isBusybool

read-onlyinherited

isPublicSwitchbool

Public Event or Not.
read / write

isRegisterableSwitchbool

If event is registerable after creation.
read / write

latitudedouble?

Latitude store.
read / write

locationFocusFocusNode

LocationFocus FocusNode.
read / write

longitudedouble?

Longitude store.
read / write

memberCheckedMapMap<String, bool>

Getter to return members map.
read-only

orgMembersListList<User>

Organisation Members List.
read / write

runtimeTypeType

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

selectedMembersList<User>

Getter to return selected members.
read-only

stateViewState

read-onlyinherited

titleFocusFocusNode

TitleFocus FocusNode.
read / write

validateAutovalidateMode

AutoValidateMode default to disabled.
read / write

Methods

addListener(VoidCallback listener) void

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

buildUserList() void

This function build the user list.

createEvent() Future<void>

This function is used to create the event for the organization.

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

getCurrentOrgUsersList() Future<List<User>>

This function fetch all the users in the current organization and return List.

getImageFromGallery({bool camera = false}) Future<void>

This function is used to get the image from gallery.

initialize() void

Function To Initialize.

noSuchMethod(Invocation invocation) dynamic

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

notifyListeners() void

Call all the registered listeners.
inherited

removeImage() void

This function remove the selected image.

removeListener(VoidCallback listener) void

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

removeUserFromList({required String userId}) void

This function is used to remove a user from user's list.

setState(ViewState viewState) void

inherited

toString() String

A string representation of this object.
inherited

Operators

operator ==(Object other) bool

The equality operator.
inherited