RtInterface class

A class that represents the interface for Rt.

It is intended to be used as a mixin with other classes.

Available extensions

Constructors

RtInterface.new()

Properties

dependencyInjection → DependencyInjection
no setterinherited
eventHandler → EventHandler
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stateManagement → StateManagement<RtState>
no setterinherited

Methods

addObserver(covariant IObserver observer) → void
Adds an observer to the manager.
inherited
batch<T>(FutureOr<T> callback()) FutureOr<T>
Executes the given callback function within a batch operation.
inherited
builder<T extends Object?>(InstanceBuilder<T> builder, {String? id, Object? ref}) → T?
Register a builder function of the T dependency with/without id as DependencyMode.builder and creates the instance if it isn't already registered, else gets its instance only.
inherited
create<T extends Object?>(InstanceBuilder<T> builder, {String? id, Object? ref, DependencyMode mode = DependencyMode.builder}) → T?
Register a builder function of the T dependency with/without id and creates the instance if it isn't already registered, else gets its instance only.
inherited
delete<T extends Object?>([String? id, Object? ref]) bool
Deletes the dependency from the store if it has been removed from all references and meets the conditions of dependency type.
inherited
destroy<T extends Object?>({String? id, bool onlyInstance = false}) bool
Destroys the instance and builder function of the T dependency with/without id.
inherited
emit(Object? instance, Enum eventName, [dynamic param]) → void
Trigger eventName event with or without the param given.
inherited
exists<T extends Object?>([String? id]) bool
Checks if the instance of T dependency with/without id exists.
inherited
factory<T extends Object?>(InstanceBuilder<T> builder, {String? id, Object? ref}) → T?
Register a builder function of the T dependency with/without id as DependencyMode.factory and creates the instance if it isn't already registered, else gets its instance only.
inherited
find<T extends Object?>([String? id]) → T?
Gets the instance of the T dependency with/without id.
inherited
get<T extends Object?>([String? id, Object? ref]) → T?
Creates and/or gets the instance of the T dependency with/without id.
inherited
getDependencyMode(Object? instance) DependencyMode?
Returns DependencyMode of instance parameter.
inherited
getDependencyRef<T extends Object?>(Object? instance) → DependencyRef<T>?
Returns the DependencyRef associated with the given instance. If the instance is null or not found, returns null.
inherited
getDependencyRegisterByRef<T extends Object?>(DependencyRef<T?>? dependencyRef) → DependencyRegister<T?>?
Returns the DependencyRegister of T type with a given dependencyRef.
inherited
getRefAt<T extends Object?>(int index, [String? id]) Object?
Returns the reference at a specified index for a given type and optional ID.
inherited
hasRegister<T extends Object?>([String? id]) bool
Checks if the T dependency with/without id is registered in Reactter.
inherited
initializeDevTools() → void

Available on RtInterface, provided by the RtDevToolsExt extension

Initialize the devtools for observing the states and dependencies. This will enable the devtools extension in the Reactter tab.
initializeLogger({String name = 'REACTTER', LogOutput output = dev.log}) → void

Available on RtInterface, provided by the RtLoggerExt extension

Initializes the logger.
isActive(Object? instance) bool
Checks if the instance is active in Reactter.
inherited
lazyBuilder<T extends Object?>(InstanceBuilder<T> builder, {String? id}) bool
Register a builder function of the T dependency with/without id as DependencyMode.builder.
inherited
lazyFactory<T extends Object?>(InstanceBuilder<T> builder, {String? id}) bool
Register a builder function of the T dependency with/without id as DependencyMode.factory.
inherited
lazySingleton<T extends Object?>(InstanceBuilder<T> builder, {String? id}) bool
Register a builder function of the T dependency with/without id as DependencyMode.singleton.
inherited
lazyState<T extends S>(T buildState(), Object instance) → T
Lazily initializes a state of type IState and attaches it to the given instance.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
off<T, P>(Object? instance, Enum eventName, CallbackEvent<T, P> callback) → void
Removes the callback of eventName.
inherited
offAll(Object? instance, [bool generic = false]) → void
Removes all instance's events
inherited
on<T, P>(Object? instance, Enum eventName, CallbackEvent<T, P> callback) → void
Puts on to listen eventName event.
inherited
one<T, P>(Object? instance, Enum eventName, CallbackEvent<T, P> callback) → void
Puts on to listen eventName event only once.
inherited
register<T extends Object?>(InstanceBuilder<T> builder, {String? id, DependencyMode mode = DependencyMode.builder}) bool
Register a builder function of the T dependency with/without id.
inherited
registerState<T extends S>(T buildState()) → T
Register a new state by invoking the provided buildState function.
inherited
removeObserver(IObserver observer) → void
Removes an observer from the manager.
inherited
singleton<T extends Object?>(InstanceBuilder<T> builder, {String? id, Object? ref}) → T?
Register a builder function of the T dependency with/without id as DependencyMode.singleton and creates the instance if it isn't already registered, else gets its instance only.
inherited
toString() String
A string representation of this object.
inherited
unregister<T extends Object?>([String? id]) bool
Removes a builder function registed of T type with an id optional.
inherited
untracked<T>(FutureOr<T> callback()) FutureOr<T>
Executes the given callback function without tracking any state changes. This means that any state changes that occur inside the callback function will not trigger any side effects.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited