Skip to content

Instantly share code, notes, and snippets.

@vferreirati
Created September 19, 2019 13:29
Show Gist options
  • Save vferreirati/532067b75be0a2d29b3d6c51d8bcb732 to your computer and use it in GitHub Desktop.
Save vferreirati/532067b75be0a2d29b3d6c51d8bcb732 to your computer and use it in GitHub Desktop.
Future<Event<bool>> login(LoginModel loginModel) async {
try {
final loginResponse = await _authService.login();
return SuccessEvent(data: true);
} catch(e) {
if(e is SocketException) {
// Usuário sem internet
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment