FlatListItem class
A FlatListItem is typically added to a ListView to display textual information.
FlatListItem is divided into three columns, wherein, the first one on the left
displays an icon, second and the third column each have 2 rows, wherein,
the first row is typically used to display the headings to represent the
data that is displayed in the second row. The container that holds all these
columns and items is called as a 'holder' in a FlatListItem, whose dimensions
are calculated automatically based on the dimensions of the user device
screen and the ScalePreset chosen by the user. Also, based on the ScalePreset
chosen, all the items of the holder are scaled accordingly. It is important
to know that if a FlatListItem is added to a ListView, the indexInList
field
is typically used to hold its index in the ListView to which it is added, so
that it becomes possible to query a FlatListItem when added to ListView to
get its position within the ListView.
Constructors
- FlatListItem({@required BuildContext context, int indexInList: 0, double cornerRadius: 0.0, ScalePreset scalePreset: ScalePreset.normal, Color backgroundColor: Colors.white, Icon icon, String leftLabelText, String leftDataText, String rightLabelText, String rightDataText, Color leftLabelTextColor: Colors.grey, Color leftDataTextColor: Colors.black, Color rightLabelTextColor: Colors.grey, Color rightDataTextColor: Colors.black, FontWeight leftLabelTextFontWeight: FontWeight.normal, FontWeight leftDataTextFontWeight: FontWeight.normal, FontWeight rightLabelTextFontWeight: FontWeight.normal, FontWeight rightDataTextFontWeight: FontWeight.normal, bool showHangingDivider: true, Color hangingDividerColor: Colors.lightGreen, OnItemTap onTap })
- Constructs a FlatListItem with white background. This is the primary constructor that is also the most customizable.
- FlatListItem.dark({@required BuildContext context, int indexInList: 0, double cornerRadius: 0.0, ScalePreset scalePreset: ScalePreset.normal, Icon icon, String leftLabelText, String leftDataText, String rightLabelText, String rightDataText, FontWeight centerTitleFontWeight: FontWeight.normal, FontWeight centerSubTitleFontWeight: FontWeight.normal, FontWeight trailingTitleFontWeight: FontWeight.normal, FontWeight trailingSubTitleFontWeight: FontWeight.normal, bool showHangingDivider: true, OnItemTap onTap })
- Constructs a FlatListItem with dark background.
- FlatListItem.lightGreen({@required BuildContext context, int indexInList: 0, double cornerRadius: 0.0, ScalePreset scalePreset: ScalePreset.normal, Icon icon, String leftLabelText, String leftDataText, String rightLabelText, String rightDataText, FontWeight leftLabelTextFontWeight: FontWeight.normal, FontWeight leftDataTextFontWeight: FontWeight.normal, FontWeight rightLabelTextFontWeight: FontWeight.normal, FontWeight rightDataTextFontWeight: FontWeight.normal, bool showHangingDivider: true, OnItemTap onTap })
- Constructs a FlatListItem with light-green background.
- FlatListItem.purple({@required BuildContext context, int indexInList: 0, double cornerRadius: 0.0, ScalePreset scalePreset: ScalePreset.normal, Icon icon, String leftLabelText, String leftDataText, String rightLabelText, String rightDataText, FontWeight leftLabelTextFontWeight: FontWeight.normal, FontWeight leftDataTextFontWeight: FontWeight.normal, FontWeight rightLabelTextFontWeight: FontWeight.normal, FontWeight rightDataTextFontWeight: FontWeight.normal, bool showHangingDivider: true, OnItemTap onTap })
- Constructs a FlatListItem with purple background.
- FlatListItem.transparent({@required BuildContext context, int indexInList: 0, double cornerRadius: 0.0, ScalePreset scalePreset: ScalePreset.normal, Icon icon, String leftLabelText, String leftDataText, String rightLabelText, String rightDataText, FontWeight leftLabelTextFontWeight: FontWeight.normal, FontWeight leftDataTextFontWeight: FontWeight.normal, FontWeight rightLabelTextFontWeight: FontWeight.normal, FontWeight rightDataTextFontWeight: FontWeight.normal, bool showHangingDivider: true, OnItemTap onTap })
- Constructs a FlatListItem with transparent background.
Properties
Methods
-
build(
BuildContext context) → Widget - Describes the part of the user interface represented by this widget. [...]
-
computedMaxLinesToDisplay(
) → int - Returns the maximum lines to display in the rightDataText row based on the ScalePreset chosen by the user. The smaller the ScalePreset chosen the lesser the number of lines displayed and vice-versa. When ScalePreset.minimal is selected '1' line is displayed, '2' lines in case of ScalePreset.small and ScalePreset.normal, '3' in case of ScalePreset.large and '8' in Portrait orientation and '5' in Landscape orientation for ScalePreset.gigantic.
-
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. [...]@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.debug }) → String -
Returns 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 ==(
dynamic other) → bool -
The equality operator. [...]
inherited