EmptyDefault class abstract
Extend this class when you need to provide a TestDefault implementation for a given type.
Say for example that you have some service called AuthService
which might look something like this:
class AuthService {
bool get isLoggedIn => ...
void logout() { ... }
}
If you want to create a version of this service with no real code which you can use in your testDriver
you have to create some class which implements this interface.
Now if you just create some class which implements the AuthService
then you are also forced to override the complete interface of the AuthService
.
To get around this you can just extend the EmptyDefault. This way you are not force to override any interface. And if you want/need a default implementation for a given interface, then you can just choose to implement that. Like so:
class TestDefaultAuthService extends EmptyDefault implements AuthService {}
Constructors
- EmptyDefault()
-
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.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited