KrStreamBuilder<T> class

Inheritance

Constructors

KrStreamBuilder({Key? key, required Stream<T> stream, required Widget builder(T), Widget onError(Object?)?, Size? shimmerSize, double? shimmerRadius, Widget? onEmpty, Widget? blocs, Widget? onLoading, Color? baseColor, Color? highlightColor, T? initialData})
const

Properties

baseColor Color?
shimmer gradiant colors.
final
blocs Widget?
This can be used to add shimmer effect card loading. All you need is adding blocs of Containers.
final
builder Widget Function(T)
The builder return the proper widget according to the connections state and the data. return loading widget if the connection is waiting. return error widget if the connection fail. return empty widget (or you can specify it) if the return is null; if the connections success then the data will pass to hte builder and build your widget.
final
hashCode int
The hash code for this object.
no setterinherited
highlightColor Color?
final
initialData → T?
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onEmpty Widget?
final
onError → (Widget Function(Object?)?)
Specify the error widget.
final
onLoading Widget?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shimmerRadius double?
final
shimmerSize Size?
Instead of blocs, you can specify the diamention and/or radius of the shimmer card.
final
stream Stream<T>
The asynchronous computation to which this builder is currently connected, possibly null.
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}) 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