diff --git a/packages/stream_chat_flutter_core/lib/src/message_list_core.dart b/packages/stream_chat_flutter_core/lib/src/message_list_core.dart index 697e7e39..2b9e5c0e 100644 --- a/packages/stream_chat_flutter_core/lib/src/message_list_core.dart +++ b/packages/stream_chat_flutter_core/lib/src/message_list_core.dart @@ -5,12 +5,6 @@ import 'package:flutter/material.dart'; import 'package:stream_chat/stream_chat.dart'; import 'stream_channel.dart'; -/// A signature for a callback which exposes an error and returns a function. -/// This Callback can be used in cases where an API failure occurs and the widget -/// is unable to render data. -typedef StreamErrorBuilder = Widget Function( - BuildContext context, Object error); - /// [MessageListCore] is a simplified class that allows fetching a list of messages while exposing UI builders. /// A [MessageListController] is used to paginate data. /// @@ -89,7 +83,6 @@ class MessageListCore extends StatefulWidget { /// Callback triggered when an error occurs while performing the given request. /// This parameter can be used to display an error message to users in the event /// of a connection failure. - final StreamErrorBuilder errorWidgetBuilder; /// If true will show a scroll to bottom message when there are new messages and the scroll offset is not zero final bool showScrollToBottom; diff --git a/packages/stream_chat_flutter_core/lib/src/typedef.dart b/packages/stream_chat_flutter_core/lib/src/typedef.dart new file mode 100644 index 00000000..6cbc25a6 --- /dev/null +++ b/packages/stream_chat_flutter_core/lib/src/typedef.dart @@ -0,0 +1,7 @@ +import 'package:flutter/widgets.dart'; + +/// A signature for a callback which exposes an error and returns a function. +/// This Callback can be used in cases where an API failure occurs and the widget +/// is unable to render data. +typedef ErrorBuilder = Widget Function( + BuildContext context, Object error); \ No newline at end of file