InstancesModule class abstract

Class describing set of dependencies that need to be initialized if instance depending on this module is created

Example:

class TestModule extends InstancesModule {
  @override
  List<Connector> get dependencies => [
        app.connectors.postInteractorConnector(),
        app.connectors.postsInteractorConnector(),
      ];

  @override
  String get id => 'test';
}

class Modules {
  static get test => TestModule();
}

@singleton
class StringWrapper extends BaseWrapper<Map<String, dynamic>?> {
  @override
  DependentKoreInstanceConfiguration get configuration =>
    DependentKoreInstanceConfiguration(
      modules: [
        Modules.test,
      ],
    );
}

Constructors

InstancesModule()

Properties

dependencies List<Connector>
List of all dependencies required in this module
no setter
hashCode int
The hash code for this object.
no setterinherited
id String
Unique module id - this will be basically id of scope in DI container
no setter
parts List<PartConnector>
List of all parts required in this module
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
useAsyncLazyInstanceDelegate Future<T> Function<T extends BaseKoreInstance>({int index})
getter/setter pair
useInstanceDelegate ↔ T Function<T extends BaseKoreInstance>({int index})
getter/setter pair
useInstancePartDelegate ↔ T Function<T extends BaseInstancePart<dynamic, KoreInstance>>({int index})
getter/setter pair
useLazyInstanceDelegate ↔ T Function<T extends BaseKoreInstance>({int index})
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
scopedDependencies() List<Connector>
Returns list of connectors for this module for eventual dependent instance
toString() String
A string representation of this object.
inherited
useAsyncLazyLocalInstance<T extends BaseKoreInstance>({int index = 0}) Future<T>
Returns connected instance
useInstancePart<T extends BaseInstancePart<dynamic, KoreInstance>>({int index = 0}) → T
Returns connected part
useLazyLocalInstance<T extends BaseKoreInstance>({int index = 0}) → T
Returns connected instance
useLocalInstance<T extends BaseKoreInstance>({int index = 0}) → T
Returns connected instance

Operators

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