Created
August 26, 2019 16:29
-
-
Save trongdth/77771f4336feb355f0a3821593c07909 to your computer and use it in GitHub Desktop.
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:equatable/equatable.dart'; | |
import 'package:flutter_bloc_back4app/data/models/message.dart'; | |
import 'package:meta/meta.dart'; | |
abstract class HomeState extends Equatable{ | |
HomeState([List props = const[]]) : super([props]); | |
} | |
class HomeLoaded extends HomeState { | |
final List<Message> lstMessages; | |
HomeLoaded({@required this.lstMessages}) : assert(lstMessages != null), super([lstMessages]); | |
@override | |
String toString() => 'HomeLoaded'; | |
} | |
class HomeLoading extends HomeState { | |
@override | |
String toString() => 'HomeLoading'; | |
} | |
class Failure extends HomeState { | |
final String error; | |
Failure({@required this.error}) : super([error]); | |
@override | |
String toString() => 'Failure { error: $error }'; | |
} | |
class SendMessageSuccess extends HomeState { | |
@override | |
String toString() => 'SendMessageSuccess'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment