Skip to content

Instantly share code, notes, and snippets.

@felangel
Last active January 21, 2019 22:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save felangel/f29dfdec398475071f6da7a485c800ed to your computer and use it in GitHub Desktop.
Save felangel/f29dfdec398475071f6da7a485c800ed to your computer and use it in GitHub Desktop.
[flutter_login] Authentication Events
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