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: 'jdoe@example.org',
  );
  googleSignIn.channel.setMockMethodCallHandler(
      fakeSignInBackend.handleMethodCall);
});

Constructors

FakeSignInBackend()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
user FakeUser
A FakeUser object.
getter/setter pair

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