Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Chat Bloc Fixed
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 {
String toString() => 'ChatInitial';
class ChatLoading extends ChatState {
String toString() => 'ProfileLoading';
class SendMessageFail extends ChatState {
final String error;
final MessagesResponse message;
SendMessageFail({this.error, this.message}) : super([error, message]);
String toString() => 'SendMessageFail $error - message $message';
class SendMessageSuccess extends ChatState {
MessagesResponse message;
SendMessageSuccess({this.message}) : super([message]);
String toString() {
return 'SendMessageSuccess';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.