extract typedef to file
This commit is contained in:
@@ -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);
|
||||
Reference in New Issue
Block a user