ExploreEventsViewModel class
ExploreEventsViewModel class helps to interact with model to serve data to view for event explore section.
Methods include:
fetchNewEvents: to fetch new events in the organization.refreshEvents: to refersh the event.checkIfExistsAndAddNewEvent: to check if the event exists or not, if now add a new event.deleteEvent: to delete the event.choseValueFromDropdown: to return the relevant message in the dropdown after any action.
Inheritance
: - Object
- ChangeNotifier
- BaseModel
- ExploreEventsViewModel
Constructors
:
Properties
[chosenValue] [→ String] : Getter method to retrieve the chosen value. ::: features no setter :::
[demoMode] [↔ bool] : flag to check if the app is in demo mode. ::: features getter/setter pair :::
[emptyListMessage] [→ String] : Getter method to retrieve the empty list message. ::: features no setter :::
[events] [→ List[<[Event]>]] : Getter method to retrieve the list of events. ::: features no setter :::
[eventService] [→ EventService] : Getter method to retrieve the EventService instance. ::: features no setter :::
[hashCode] [→ int] : The hash code for this object. ::: features no setterinherited :::
[hasListeners] [→ bool] : Whether any listeners are currently registered. ::: features no setterinherited :::
: ::: features no setterinherited :::
[runtimeType] [→ Type] : A representation of the runtime type of the object. ::: features no setterinherited :::
: ::: features no setterinherited :::
[userEvents] [→ List[<[Event]>]] : Getter method to retrieve the list of User events. ::: features no setter :::
Methods
[addListener][([[VoidCallback] listener]) → void ] : Register a closure to be called when the object changes. ::: features inherited :::
[checkIfExistsAndAddNewEvents][([[List[<[Event]>]] newEvents]) [→ Future<[void>]] ] : This function add a new event if the event not exist.
[choseValueFromDropdown][([[String] value]) [→ Future<[void>]] ] : This function takes the choosen value from dropdown and return the filter events, if empty list then return relevant message.
[deleteEvent][ [→ Future<[void>]] ] : This function deletes the event.
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). ::: features override :::
[fetchNewEvents][ [→ Future<[void>]] ] : This function is used to fetch new events in the organization.
[initialise][ [→ Future<[void>]] ] : initialiser.
[noSuchMethod][([[Invocation] invocation]) → dynamic ] : Invoked when a nonexistent method or property is accessed. ::: features inherited :::
notifyListeners [→ void ] : Call all the registered listeners. ::: features inherited :::
[refreshEvents][ [→ Future<[void>]] ] : This function is used to refresh the events in the organization.
[removeListener][([[VoidCallback] listener]) → void ] : Remove a previously registered closure from the list of closures that are notified when the object changes. ::: features inherited :::
[setState][([[ViewState] viewState]) → void ]
: ::: features inherited :::
[toString][ [→ String] ] : A string representation of this object. ::: features inherited :::
Operators
[operator ==][([[Object] other]) [→ bool] ] : The equality operator. ::: features inherited :::
- talawa
- explore_events_view_model
- ExploreEventsViewModel class