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's device screen and the ScalePreset chosen by the user. Also, based on the ScalePreset chosen, all the items of the holder are scaled accordingly.
Constructors
- FlatListItem({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, String rightDataTextFontFamily, Color hangingDividerColor: Colors.lightGreen })
- Constructs a FlatListItem with white background. This is the primary constructor that is also the most customizable.
- FlatListItem.dark({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, String rightDataTextFontFamily, bool showHangingDivider: true })
- ////////////////// PRE-CONFIGURED ///////////////////////////////////////// Constructs a FlatListItem with dark background.
- FlatListItem.lightGreen({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, String rightDataTextFontFamily, bool showHangingDivider: true })
- Constructs a FlatListItem with light-green background.
- FlatListItem.purple({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, String rightDataTextFontFamily, bool showHangingDivider: true })
- Constructs a FlatListItem with purple background.
- FlatListItem.transparent({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, String rightDataTextFontFamily, bool showHangingDivider: true })
- Constructs a FlatListItem with transparent background.
Properties
Methods
-
build(
BuildContext context) → Widget - Describes the part of the user interface represented by this widget. [...]
-
computedMaxLinesToDisplay(
BuildContext context) → 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 '7' in Portrait orientation and '4' 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