EchidnaModule class

Module for using the echidna client sdk.

To use this module, import it in your application and call LicenseRepoX.initializeLicenseRepo to initialize the license repository:

class MyAuthModule extends Module {
  @override
  List<Module> get imports => [
    EchidnaModule(),
  ];

  @override
  void binds(Injector i) {
    // add your other bindings here
    i.initializeLicenseRepo(MyUserIdRepository.new); // this should be called last
  }
}

Also, make sure to call initializeEchidnaApi.

After that you can use FeatureGuard to guard your routes based on the license status.

class MyFeatureModule extends Module {
  @override
  List<Module> get imports => [
    MyAuthModule(),
  ];

  @override
  void routes(RouteManager r) {
    r.guard('/my-feature', guards: [FeatureGuard(myFeatureId)]);
  }
}

Note that you need to implement UserIdRepository in your application.

Inheritance

Constructors

EchidnaModule()

Properties

hashCode int
The hash code for this object.
no setterinherited
imports List<Module>
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

binds(Injector i) → void
inherited
exportedBinds(Injector i) → void
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
routes(RouteManager r) → void
override
toString() String
A string representation of this object.
inherited

Operators

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