Created
March 24, 2019 17:25
-
-
Save felangel/3e58740f38dcf4b416f003f9560e6259 to your computer and use it in GitHub Desktop.
Chat Bloc Fixed
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_app/network/response/message_response.dart'; | |
abstract class ChatState extends Equatable { | |
ChatState([List props = const []]) : super(props); | |
} | |
class ChatInitial extends ChatState { | |
@override | |
String toString() => 'ChatInitial'; | |
} | |
class ChatLoading extends ChatState { | |
@override | |
String toString() => 'ProfileLoading'; | |
} | |
class SendMessageFail extends ChatState { | |
final String error; | |
final MessagesResponse message; | |
SendMessageFail({this.error, this.message}) : super([error, message]); | |
@override | |
String toString() => 'SendMessageFail $error - message $message'; | |
} | |
class SendMessageSuccess extends ChatState { | |
MessagesResponse message; | |
SendMessageSuccess({this.message}) : super([message]); | |
@override | |
String toString() { | |
return 'SendMessageSuccess'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment