StoryList class
{@tool snippet} This is a sample of a StoryList widget.
StoryList(
onPressedIcon: () {
//TODO something
},
image: Image.network(
_kImageUrls.first,
fit: BoxFit.cover,
),
text: Text(
"Create Story",
maxLines: 1,
style: TextStyle(
fontSize: 12,
color: Colors.black,
),
),
itemCount: _kImageUrls.length,
itemBuilder: (context, index) => Image.network(
_kImageUrls[index],
),
)
{@end-tool}
Constructors
- StoryList({Key key, Widget image, Widget text, IndexedWidgetBuilder itemBuilder, int itemCount = 0, double height = 200, double addItemWidth = 100, double itemMargin = 8, Color backgroundColor = Colors.white, Color borderColor = Colors.black12, Color iconBackgroundColor = Colors.blue, Color addItemBackgroundColor = const Color(4293914607), double borderRadius = 16, double iconSize = 24, Function onPressedIcon})
-
image
is the image at CreateStory item.text
is the text at CreateStory item.itemBuilder
builds list items.itemCount
is required for list.height
is required for list.addItemWidth
is the width of CreateStory item.itemMargin
is the margin between of list items.backgroundColor
is the list.borderColor
is the color of the rounded border of each item.iconBackgroundColor
is the background of circle button in CreateStory item.addItemBackgroundColor
is the background of CreateStory item.borderRadius
is the radius of the rounded border of each item.iconSize
is the size of circle button in CreateStory item.onPressedIcon
is the action when clicked on circle button in CreateStory item.const
Properties
- addItemBackgroundColor → Color
-
final
- addItemWidth → double
-
final
- backgroundColor → Color
-
final
- borderColor → Color
-
final
- borderRadius → double
-
final
- hashCode → int
-
The hash code for this object. [...]
@nonVirtual, read-only, inherited
- height → double
-
final
- iconBackgroundColor → Color
-
final
- iconSize → double
-
final
- image → Widget
-
final
- itemBuilder → IndexedWidgetBuilder
-
final
- itemCount → int
-
final
- itemMargin → double
-
final
- key → Key
-
Controls how one widget replaces another widget in the tree. [...]
final, inherited
- onPressedIcon → Function
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
- text → Widget
-
final
Methods
-
createElement(
) → StatefulElement -
Creates a
StatefulElement
to manage this widget's location in the tree. [...]inherited -
createState(
) → _StoryListState - Creates the mutable state for this widget at a given location in the tree. [...]
-
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