authenticate method

void authenticate({
  1. required T user,
  2. dynamic data,
})

Call to change state to Authenticated

Implementation

void authenticate({required T user, dynamic data}) {
  this.state = State.Authenticated<T>(user: user, data: data);
  onAuthenticate(context, user: user, data: data);
}