EndlessStreamGridView<T> class
An infinite loading grid view that builds items added to the stream into a scrollable grid.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- EndlessStreamGridView
Constructors
-
EndlessStreamGridView({required void loadMore(), required dynamic itemBuilder(BuildContext context, {required int index, required T item, required int totalItems}), required SliverGridDelegate gridDelegate, required Stream<
List< stream, Widget headerBuilder(BuildContext context)?, EndlessStateProperty? headerBuilderState, Widget emptyBuilder(BuildContext context)?, EndlessStateProperty? emptyBuilderState, Widget loadingBuilder(BuildContext context)?, EndlessStateProperty? loadingBuilderState, Widget loadMoreBuilder(BuildContext context)?, EndlessStateProperty? loadMoreBuilderState, EndlessStreamController<T> >T> ? controller, ScrollController? scrollController, void onStateChange(Set<EndlessState> states)?, ScrollPhysics? physics, double? extentAfterFactor = 0.4, bool? loadOnSubscribe = true, EdgeInsets? padding = const EdgeInsets.all(0), dynamic key}) -
const
Properties
-
controller
→ EndlessStreamController<
T> ? -
The stream controller used to perform actions on the grid view such as loading more data
or clearing the grid.
final
- emptyBuilder → Widget Function(BuildContext context)?
-
The builder function for the grid view empty state.
final
- emptyBuilderState → EndlessStateProperty?
-
The state property for the grid view empty state.
final
- extentAfterFactor → double?
-
The fraction of the remaining quantity of content conceptually "below" the viewport in the scrollable
relative to the maximum height of the scrollable region at which point loadMore should be called to
load more data.
final
-
The builder function for the grid view footer.
final
-
The state property for the grid view footer.
final
- gridDelegate → SliverGridDelegate
-
Controls the layout of tiles in a grid. See GridView.gridDelegate
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- headerBuilder → Widget Function(BuildContext context)?
-
The builder function for the grid view header.
final
- headerBuilderState → EndlessStateProperty?
-
The state property for the grid view header.
final
- itemBuilder → dynamic Function(BuildContext context, {required int index, required T item, required int totalItems})
-
The builder function for the grid view items.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- loadingBuilder → Widget Function(BuildContext context)?
-
The builder function for the grid view loading state.
final
- loadingBuilderState → EndlessStateProperty?
-
The state property for the grid view loading state.
final
- loadMore → void Function()
-
A function which adds more items to the stream when the grid view is scrolled
to its threshold for loading more items determined by the extentAfterFactor.
final
- loadMoreBuilder → Widget Function(BuildContext context)?
-
The builder function for the grid view load more action widget.
final
- loadMoreBuilderState → EndlessStateProperty?
-
The state property for the grid view load more action widget.
final
- loadOnSubscribe → bool?
-
Whether to immediately request data from the stream when it is first subscribed to by calling
the EndlessStreamGridView.loadMore API.
final
-
onStateChange
→ void Function(Set<
EndlessState> states)? -
A callback function that provides the current states of the endless scroll view whenever they change.
final
- padding → EdgeInsets?
-
The padding around the scroll view.
final
- physics → ScrollPhysics?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollController → ScrollController?
-
The scroll controller for the grid view.
final
-
stream
→ Stream<
List< T> > -
The stream of items that will be added to the grid view.
final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent 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, int wrapWidth = 65}) → 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.
inherited
Static Methods
-
fromData<
Y> (EndlessStreamGridViewData< Y> data) → EndlessStreamGridView