Last active
January 21, 2019 22:43
-
-
Save felangel/f29dfdec398475071f6da7a485c800ed to your computer and use it in GitHub Desktop.
[flutter_login] Authentication Events
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:meta/meta.dart'; | |
import 'package:equatable/equatable.dart'; | |
abstract class AuthenticationEvent extends Equatable { | |
AuthenticationEvent([List props = const []]) : super(props); | |
} | |
class AppStarted extends AuthenticationEvent { | |
@override | |
String toString() => 'AppStarted'; | |
} | |
class LoggedIn extends AuthenticationEvent { | |
final String token; | |
LoggedIn({@required this.token}) : super([token]); | |
@override | |
String toString() => 'LoggedIn { token: $token }'; | |
} | |
class LoggedOut extends AuthenticationEvent { | |
@override | |
String toString() => 'LoggedOut'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment