eva library

Classes

Command
This is the base class for all Commands.
CommandEventBuilder<TCommand extends Command, TEventState>
This is an EventBuilder<TEventState>, but it will dispatch the command when the widget is added to the widget tree
DomainIsolateController
EmptyEvent<T>
Represents an empty event
Environment
An environment is a class that configures all your dependencies and injections
Eva
Event Architecture
EvaReadyEvent
Event dispatched when Eva is fully initialized
Event<T>
Events are classes that hold a value (success), no value (empty), a failure (exception) or a waiting state.
EventBuilder<TEventState>
Listens to events of type TEventState and rebuilds using the appropriated arguments depending on the type of the Event
EventState<TEventState>
Inherited widget that holds the last event captured by the previous EventBuilder<TEventState> or CommandEventBuilder<TEventState>
FailureEvent<T>
Represents a failure event
IDomain
Every domain must be decorated with this interface
IEmptyEvent
Represents an empty event
IEvent
Represents the base level of an event
IFailureEvent
Represents a failure event
IInitializable
When a service implements this interface, the method initialize will be called when the ServiceProvider instantiates a new instance
Immutable
Used to annotate a class.
IMustBeSingleton
IMustBeTransient
IPlatformInfo
IRepository
Every domain must be decorated with this interface
ISuccessEvent
Represents a success event
IWaitingEvent
Represents a waiting event
Log
A simple Dart logger
PlatformInfo
Holds information about the current platform and host.
Required
Used to annotate a named parameter p in a method or function f.
ResourceIdentifier
Annotates a static method as referencing a native resource.
Response<T>
This class holds results for an operation.
ServiceProvider
Defines a mechanism for retrieving a service object; that is, an object that provides custom support to other objects.
SuccessEvent<T>
Represents a success event
UnexpectedExceptionEvent
Event dispatched when an unhandled exception is thrown
UseResult
See useResult for more details.
WaitingEvent<T>
Represents a waiting event

Enums

LogColor
ANSI colors to use in logs
LogLevel
Log levels
NativePlatform
The app is running as a native app in one of these OSes or is Flutter Web?
PlatformDesignSystem
The design system used by the platform host
PlatformHost
After considering PlatformMedia, which host is running the app?
PlatformMedia
What kind of platform the app is running?
ResponseType
Types of Response

Constants

alwaysThrows → const _AlwaysThrows
Used to annotate a function f. Indicates that f always throws an exception. Any functions that override f, in class inheritance, are also expected to conform to this contract.
checked → const _Checked
Used to annotate a parameter of an instance method that overrides another method.
doNotStore → const _DoNotStore
Used to annotate a method, getter or top-level getter or function to indicate that the value obtained by invoking it should not be stored in a field or top-level variable. The annotation can also be applied to a class to implicitly annotate all of the valid members of the class, or applied to a library to annotate all of the valid members of the library, including classes. If a value returned by an element marked as doNotStore is returned from a function or getter, that function or getter should be similarly annotated.
doNotSubmit → const _DoNotSubmit
Used to annotate a method, getter or top-level getter or function that is not intended to be accessed in checked-in code, but might be ephemerally used during development or local testing.
experimental → const _Experimental
Used to annotate a library, or any declaration that is part of the public interface of a library (such as top-level members, class members, and function parameters) to indicate that the annotated API is experimental and may be removed or changed at any-time without updating the version of the containing package, despite the fact that it would otherwise be a breaking change.
factory → const _Factory
Used to annotate an instance or static method m. Indicates that m must either be abstract or must return a newly allocated object or null. In addition, every method that either implements or overrides m is implicitly annotated with this same annotation.
immutable → const Immutable
Used to annotate a class C. Indicates that C and all subtypes of C must be immutable.
internal → const _Internal
Used to annotate a declaration which should only be used from within the package in which it is declared, and which should not be exposed from said package's public API.
isTest → const _IsTest
Used to annotate a test framework function that runs a single test.
isTestGroup → const _IsTestGroup
Used to annotate a test framework function that runs a group of tests.
literal → const _Literal
Used to annotate a const constructor c. Indicates that any invocation of the constructor must use the keyword const unless one or more of the arguments to the constructor is not a compile-time constant.
mustBeConst → const _MustBeConst
Used to annotate a parameter which should be constant.
mustBeOverridden → const _MustBeOverridden
Used to annotate an instance member m declared on a class or mixin C. Indicates that every concrete subclass of C must directly override m.
mustCallSuper → const _MustCallSuper
Used to annotate an instance member (method, getter, setter, operator, or field) m. Indicates that every invocation of a member that overrides m must also invoke m. In addition, every method that overrides m is implicitly annotated with this same annotation.
nonVirtual → const _NonVirtual
Used to annotate an instance member (method, getter, setter, operator, or field) m in a class C or mixin M. Indicates that m should not be overridden in any classes that extend or mixin C or M.
optionalTypeArgs → const _OptionalTypeArgs
Used to annotate a class, mixin, extension, function, method, or typedef declaration C. Indicates that any type arguments declared on C are to be treated as optional.
protected → const _Protected
Used to annotate an instance member in a class or mixin which is meant to be visible only within the declaring library, and to other instance members of the class or mixin, and their subtypes.
redeclare → const _Redeclare
Used to annotate an instance member of an extension type that redeclares a member from a superinterface.
reopen → const _Reopen
Annotation for intentionally loosening restrictions on subtyping that would otherwise cause lint warnings to be produced by the implicit_reopen lint.
required → const Required
Used to annotate a named parameter p in a method or function f. Indicates that every invocation of f must include an argument corresponding to p, despite the fact that p would otherwise be an optional parameter.
sealed → const _Sealed
Annotation marking a class as not allowed as a super-type outside of the current package.
useResult → const UseResult
Used to annotate a method, field, or getter within a class, mixin, or extension, or a or top-level getter, variable or function to indicate that the value obtained by invoking it should be used. A value is considered used if it is assigned to a variable, passed to a function, or used as the target of an invocation, or invoked (if the result is itself a function).
virtual → const _Virtual
Used to annotate a field that is allowed to be overridden in Strong Mode.
visibleForOverriding → const _VisibleForOverriding
Used to annotate an instance member that was made public so that it could be overridden but that is not intended to be referenced from outside the defining library.
visibleForTesting → const _VisibleForTesting
Used to annotate a declaration that was made public, so that it is more visible than otherwise necessary, to make code testable.

Typedefs

InjectorDelegate<TService> = TService Function(TConcrete? optional<TConcrete>(), TConcrete required<TConcrete>(), PlatformInfo platform)
RequiredFactory = TService Function<TService>({String? key})
This delegate is a function that returns whatever dependency was injected.

Exceptions / Errors

InvalidRegistrationModalForTypeException
This exception is thrown when you try to register a service that implements IMustBeTransient as singleton or IMustBeSingleton as transient.
RegistryMustBeSingletonException
This exception is thrown when you try to register a service that implements IMustBeTransient as transient.
RegistryMustBeTransientException
This exception is thrown when you try to register a service that implements IMustBeTransient as singleton.
ServiceAlreadyRegisteredException
This exception is thrown when you try to register a service with the same name twice.
ServiceInvalidInferenceException
This exception is thrown when you try to use a service provider method without specifying the TService generic argument, so the Service Provider cannot know what type to return
ServiceNotRegisteredException
This exception is thrown when you try to get a required service from ServiceProvider and the service was not registered.