MvvmInstance<T> class
abstract
Base class for mvvm instance
Contains basic interface for init and dispose operations Also every mvvm instance connected to main app event bus
- Inheritance
-
- Object
- EventBusReceiver
- MvvmInstance
- Implementers
Constructors
Properties
-
allPartsReady
→ Observable<
bool> -
Observable indicating that all parts are connected to this instance
final
- configuration → MvvmInstanceConfiguration
-
MvvmInstanceConfiguration for this instance
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- input ↔ T
-
Input for this instance
latefinal
- isAsync → bool
-
Getter that returns true if instance contains async parts
or require async initialization
no setter
- isDisposed ↔ bool
-
Flag indicating that this instance is disposed
getter/setter pair
- isInitialized ↔ bool
-
Flag indicating that this instance is fully initialized
getter/setter pair
- isPaused ↔ bool
-
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
checkEventWasReceived(
Type event, {int? count}) → bool -
Returns true if underlying events list contains given event name
inherited
-
cleanupReceivedEvents(
) → void -
Cleans collection of received events
inherited
-
dispose(
) → void - Base method for instance dispose
-
disposeSub(
) → void -
Closes underlying stream subscription for EventBus
inherited
-
getFullPartConnectorsList(
) → List< PartConnector> - Returns list of parts
-
initialize(
T input) → void - Base method for instance initialization
-
initializeAsync(
) → Future< void> - Base method for async instance initialization
-
initializeInstanceParts(
) → void - Adds parts to local collection
-
initializeInstancePartsAsync(
) → Future< void> - Adds parts to local collection
-
initializeSub(
) → void -
inherited
-
initializeWithoutConnections(
T input) → void - Base method for lightweight instance initialization
-
initializeWithoutConnectionsAsync(
) → Future< void> - Base method for lightweight async instance initialization
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
on<
T> (EventBusSubscriber< T> processor, {bool reactsToPause = false, bool firesAfterResume = true}) → EventBusSubscriber -
Subscribes to event of given type
inherited
-
onAllPartReady(
) → void - Runs for every async part when it is initialized
-
onAsyncPartReady(
Type type, int? index) → void - Runs for every async part when it is initialized
-
pauseEventBusSubscription(
) → void -
Sets paused flag to false so events stop processing
override
-
resumeEventBusSubscription(
{bool sendAllEventsReceivedWhilePause = true}) → void -
Resumes events processing
override
-
subscribe(
) → List< EventBusSubscriber> -
Map of EventBus events and function to be executed for this events
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
useInstancePart<
InstancePartType extends BaseInstancePart< (dynamic, MvvmInstance> >{int index = 0}) → InstancePartType - Returns initialized instance part for given type
-
waitTillEventIsReceived(
Type event, {int? count, Duration timeout = const Duration(seconds: 1)}) → Future< void> -
Waits till given event is received by this instance
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited