FakeSignInBackend class
A fake backend that can be used to test components that require a valid GoogleSignInAccount.
Example usage:
GoogleSignIn googleSignIn;
FakeSignInBackend fakeSignInBackend;
setUp(() {
googleSignIn = GoogleSignIn();
fakeSignInBackend = FakeSignInBackend();
fakeSignInBackend.user = FakeUser(
id: 123,
email: '[email protected]',
);
googleSignIn.channel.setMockMethodCallHandler(
fakeSignInBackend.handleMethodCall);
});
Constructors
Properties
Methods
-
handleMethodCall(
MethodCall methodCall) → Future - Handles method calls that would normally be sent to the native backend. Returns with the expected values based on the current user.
-
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