extract typedef to file

This commit is contained in:
Neevash Ramdial
2021-01-29 10:18:41 -04:00
parent 20c1acc80d
commit b08940bd61
2 changed files with 7 additions and 7 deletions
@@ -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;
@@ -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);