RepoCase class
Annotation for repo_case
package
Annotate your repository class with @RepoCase()
or @repoCase
to automatically generate usecase classes for each method inside the repository
NOTE: The repository class must be abstract
!
@repoCase
abstract class Repository {
void method1();
int method2(String param);
Future<String> method3(int param1, int param2);
}
class RepositoryImpl implements Repository {
// Concrete implementation
}
The code example above will generate three classes,
each having a call
method that calls the respective function in the repository:
Method1Repo
, which callsrepository.method1()
Method2Repo
, which callsrepository.method2()
Method3Repo
, which callsrepository.method3()
Check out the offical documentation for more details and examples.
Created by Sandro Maglione
Constructors
- RepoCase()
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited