ViewModel class
Methods
addListener (VoidCallback listener )
→ void
Register a closure to be called when the object changes.
inherited
clearAllObservers ()
→ void
Stop listening to all observables
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).
override
init ()
→ void
A callback after the MVVM widget's initState is called.
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners ()
→ void
Call all the registered listeners.
override
observe (List <Observable > observables , {bool reset = true })
→ void
Listen to observables changes and call notifyListeners when a new value
is added to the stream.
onBuild ()
→ void
A callback when the build
method of the view is called.
onDependenciesChange ()
→ void
A callback when the MVVM widget's didChangeDependencies
is called.
onDetach ()
→ void
A callback when the application is still hosted on a flutter engine
but is detached from any host views.
onInactive ()
→ void
A callback when the application is in an inactive state
and is not receiving user input.
onMount ()
→ void
A callback when the view is mounted.
onPause ()
→ void
A callback when the application is not currently visible to
the user, not responding to user input, and running in the background.
onResume ()
→ void
A callback when the application is visible and responding
to user input.
onUnmount ()
→ void
A callback when the view is unmounted
removeListener (VoidCallback listener )
→ void
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
toString ()
→ String
A string representation of this object.
inherited
unobserve (List <Observable > observables )
→ void
Stop listening to specific observables