parseStatus method

FacebookLoginStatus parseStatus()

Method to parse the status from the Facebook's response to the corresponding FacebookLoginStatus value.

Implementation

FacebookLoginStatus parseStatus() {
  switch (this) {
    case 'loggedIn':
      return FacebookLoginStatus.loggedIn;
    case 'cancelledByUser':
      return FacebookLoginStatus.cancelledByUser;
    case 'error':
      return FacebookLoginStatus.error;
  }

  throw StateError('Invalid status: $this');
}