Editable class

Inheritance

Constructors

Editable({Key? key, List? columns, List? rows, double columnRatio = 0.20, ValueChanged<String>? onSubmitted, ValueChanged? onRowSaved, int columnCount = 0, int rowCount = 0, Color borderColor = Colors.grey, double tdPaddingLeft = 8.0, double tdPaddingTop = 8.0, double tdPaddingRight = 8.0, double tdPaddingBottom = 12.0, double thPaddingLeft = 8.0, double thPaddingTop = 0.0, double thPaddingRight = 8.0, double thPaddingBottom = 0.0, double trHeight = 50.0, double borderWidth = 0.5, FontWeight thWeight = FontWeight.w600, double thSize = 18, bool showSaveIcon = false, IconData saveIcon = Icons.save, Color saveIconColor = Colors.black12, double saveIconSize = 18, TextAlign tdAlignment = TextAlign.start, TextStyle? tdStyle, int tdEditableMaxLines = 1, TextAlign thAlignment = TextAlign.start, TextStyle? thStyle, CrossAxisAlignment thVertAlignment = CrossAxisAlignment.center, bool showCreateButton = false, CrossAxisAlignment createButtonAlign = CrossAxisAlignment.start, Icon? createButtonIcon, Color? createButtonColor, BoxShape? createButtonShape, Widget? createButtonLabel, Color stripeColor1 = Colors.white, Color stripeColor2 = Colors.black12, bool zebraStripe = false, InputBorder? focusedBorder})
Builds an editable table using predefined row and column counts Or using a row and header data set provided

Properties

borderColor Color
Color of table border
final
borderWidth double
width of table borders
final
columnCount int
Interger value of number of columns to be generated:
final
columnRatio double
aspect ration of each column, sets the ratio of the screen width occupied by each column it is set in fraction between 0 to 1.0 0.8 indicates 80 percent width per column
final
columns List?
A data set to create headers
final
createButtonAlign CrossAxisAlignment
Aligns the button for adding new rows
final
createButtonColor Color?
Color for the create new row button
final
createButtonIcon Icon?
Icon displayed in the create new row button
final
createButtonLabel Widget?
Label for the create new row button
final
createButtonShape BoxShape?
border shape of the create new row button
final
focusedBorder InputBorder?
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onRowSaved ValueChanged?
onRowSaved callback is triggered when a saveButton is pressed. returns only values if row is edited, otherwise returns a string 'no edit'
final
onSubmitted ValueChanged<String>?
onSubmitted callback is triggered when the enter button is pressed on a table data cell it returns a value of the cell data
final
rowCount int
Interger value of number of rows to be generated:
final
rows List?
A data set to create rows
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
saveIcon IconData
Icon for to save row data example:
final
saveIconColor Color
Color for the save Icon
final
saveIconSize double
Size for the saveIcon
final
showCreateButton bool
displays a button that adds a new row onPressed
final
showSaveIcon bool
Toogles the save button, if true displays an icon to save rows, adds an addition column to the right
final
stripeColor1 Color
The first row alternate color, if stripe is set to true
final
stripeColor2 Color
The Second row alternate color, if stripe is set to true
final
tdAlignment TextAlign
Aligns the table data
final
tdEditableMaxLines int
Max lines allowed in editable text, default: 1 (longer data will not wrap and be hidden), setting to 100 will allow wrapping and not increase row size
final
tdPaddingBottom double
Table data cell padding bottom
final
tdPaddingLeft double
Table data cell padding left
final
tdPaddingRight double
Table data cell padding right
final
tdPaddingTop double
Table data cell padding top
final
tdStyle TextStyle?
Style the table data
final
thAlignment TextAlign
Aligns the table header
final
thPaddingBottom double
Table header cell padding bottom
final
thPaddingLeft double
Table header cell padding left
final
thPaddingRight double
Table header cell padding right
final
thPaddingTop double
Table header cell padding top
final
thSize double
Table headers fontSize (use thStyle for more control of header style)
final
thStyle TextStyle?
Style the table header - use for more control of header style, using this OVERRIDES the thWeight and thSize parameters and those will be ignored.
final
thVertAlignment CrossAxisAlignment
Table header label vertical alignment
final
thWeight FontWeight
Table headers fontweight (use thStyle for more control of header style)
final
trHeight double
Table Row Height cannot be less than 40.0
final
zebraStripe bool
enable zebra-striping, set to false by default if enabled, you can style the colors stripeColor1 and stripeColor2
final

Methods

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