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
- Object
- ChangeNotifier
- BaseModel
- CreateEventViewModel
Constructors
Properties
descriptionFocus ↔ FocusNode
DescriptionFocus FocusNode.
read / write
eventDescriptionTextController ↔ TextEditingController
Event Description Text Controller.
read / write
eventEndDate ↔ DateTime
Event End Date.
read / write
eventEndTime ↔ TimeOfDay
Event End Time.
read / write
eventLocationTextController ↔ TextEditingController
Event Location Text Controller.
read / write
eventStartDate ↔ DateTime
Event Start Date.
read / write
eventStartTime ↔ TimeOfDay
Event Start Time.
read / write
eventTitleTextController ↔ TextEditingController
Event Title Text Controller.
read / write
formKey → GlobalKey<FormState>
Global FormKey.
final
hashCode → int
The hash code for this object.
read-onlyinherited
hasListeners → bool
Whether any listeners are currently registered.
read-onlyinherited
imageFile → File?
Getter to return imageFile.
read-only
isBusy → bool
read-onlyinherited
isPublicSwitch ↔ bool
Public Event or Not.
read / write
isRegisterableSwitch ↔ bool
If event is registerable after creation.
read / write
latitude ↔ double?
Latitude store.
read / write
locationFocus ↔ FocusNode
LocationFocus FocusNode.
read / write
longitude ↔ double?
Longitude store.
read / write
memberCheckedMap → Map<String, bool>
Getter to return members map.
read-only
orgMembersList ↔ List<User>
Organisation Members List.
read / write
runtimeType → Type
A representation of the runtime type of the object.
read-onlyinherited
selectedMembers → List<User>
Getter to return selected members.
read-only
state → ViewState
read-onlyinherited
titleFocus ↔ FocusNode
TitleFocus FocusNode.
read / write
validate ↔ AutovalidateMode
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