MessageSearchListCore class Null safety

MessageSearchListCore is a simplified class that allows searching for messages across channels while exposing UI builders. A MessageSearchListController is used to load and paginate data.

class MessageSearchPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: MessageSearchListCore(
        messageQuery: _messageFilter,
        filters: _channelsFilter,
        limit: 20,
      ),
    );
  }
}

Make sure to have a MessageSearchBloc ancestor in order to provide the information about the messages. The widget uses a ListView.separated to render the list of messages.

Inheritance

Constructors

MessageSearchListCore({Key? key, required WidgetBuilder emptyBuilder, required ErrorBuilder errorBuilder, required WidgetBuilder loadingBuilder, required Widget childBuilder(List<GetMessageResponse>), required Filter filters, String? messageQuery, List<SortOption>? sortOptions, @Deprecated("'pagination' is deprecated and shouldn't be used. " "This property is no longer used, Please use 'limit' instead") PaginationParams? paginationParams, Filter? messageFilters, MessageSearchListController? messageSearchListController, int? limit})
Instantiate a new MessageSearchListView. The following parameters must be supplied and not null: [...]

Properties

childBuilder Widget Function(List<GetMessageResponse>)
The builder that is used when the search messages are fetched
final
emptyBuilder WidgetBuilder
The builder used when the channel list is empty.
final
errorBuilder ErrorBuilder
The builder that will be used in case of error
final
filters Filter
The query filters to use. You can query on any of the custom fields you've defined on the Channel. You can also filter other built-in channel fields.
final
hashCode int
The hash code for this object. [...]
@nonVirtual, read-only, inherited
key Key?
Controls how one widget replaces another widget in the tree. [...]
final, inherited
limit int
The amount of messages requested per API call.
final
loadingBuilder WidgetBuilder
The builder that will be used in case of loading
final
messageFilters Filter?
The message query filters to use. You can query on any of the custom fields you've defined on the Channel. You can also filter other built-in channel fields.
final
messageQuery String?
Message String to search on
final
messageSearchListController MessageSearchListController?
A MessageSearchListController allows reloading and pagination. Use MessageSearchListController.loadData and MessageSearchListController.paginateData respectively for reloading and pagination.
final
paginationParams PaginationParams?
Pagination parameters limit: the number of messages to return (max is 30) offset: the offset (max is 1000)
@Deprecated("'pagination' is deprecated and shouldn't be used. " "This property is no longer used, Please use 'limit' instead"), final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
sortOptions List<SortOption>?
The sorting used for the channels matching the filters. Sorting is based on field and direction, multiple sorting options can be provided. You can sort based on last_updated, last_message_at, updated_at, created_ at or member_count. Direction can be ascending or descending.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree. [...]
inherited
createState() → MessageSearchListCoreState
Creates the mutable state for this widget at a given location in the tree. [...]
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children. [...]
@protected, inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node. [...]
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep. [...]
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object. [...]
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants. [...]
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object. [...]
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
@nonVirtual, inherited