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 = new GoogleSignIn();
  fakeSignInBackend = new FakeSignInBackend();
  fakeSignInBackend.user = new FakeUser(
    id: 123,
    email: 'jdoe@example.org',
  );
  googleSignIn.channel.setMockMethodCallHandler(
      fakeSignInBackend.handleMethodCall);
});

Constructors

FakeSignInBackend()

Properties

user FakeUser
A FakeUser object. [...]
read / write
hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

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 non-existent method or property is accessed.
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited