GridCarousel<T> class

Class representing the main component. Internally will use both GridCarouselPage and GridCarouselIndicator.

Inheritance

Constructors

GridCarousel.new({Key? key, String? title, required List<T> items, GridSize size = const GridSize(width: double.infinity, height: double.infinity), int rows = 1, int columns = 3, required Widget cellBuilder(T), TextStyle titleStyle = const TextStyle(color: Color.fromARGB(255, 82, 82, 82), fontWeight: FontWeight.bold), EdgeInsets? titlePadding, GridCarouselIndicatorConfig indicatorConfig = const GridCarouselIndicatorConfig(currentPageColor: Colors.orange, otherPagesColor: Color.fromARGB(255, 82, 82, 82))})
const

Properties

cellBuilder Widget Function(T)
Method which describe how to build each cell. This method is used by GridCarouselPage component.
final
columns int
Number of columns to show. By default 3.
final
hashCode int
The hash code for this object.
no setterinherited
indicatorConfig GridCarouselIndicatorConfig
Class used to customized GridCarouselIndicator. By default is orange for the current page and grey for the others
final
items List<T>
List of Objects T containing the data to render in each cell.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
rows int
Number of rows to show. By default 1.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size GridSize
Class containing width and height of the component. By default both double.infinity.
final
title String?
Optional title to show on top of the component.
final
titlePadding EdgeInsets?
EdgeInsets object used to add Padding to the title (if title is specified).
final
titleStyle TextStyle
TextStyle object used to customized the title (if title is specified). By default will be grey in bold
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<GridCarousel<T>>
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.
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