Skip to content

TableFormatter

Category: UI

Source: table_formatter.dart

Enums

TableAlign

ValueDescription
left
right

Classes

TableColumn

Constructor

dart
const TableColumn({
    required this.key,
    required this.header,
    this.align = TableAlign.left,
    this.minWidth = 0,
    this.maxWidth,
  })

Properties

PropertyTypeDescription
keyString
headerString
alignTableAlign
minWidthint
maxWidthint?

TableRender

Constructor

dart
const TableRender({required this.headerLines, required this.rowLines})

Properties

PropertyTypeDescription
headerLinesList<String>
rowLinesList<String>

TableFormatter

Methods

`static TableRender format({
required List<TableColumn> columns,
required List<Map<String, String>> rows,
String gap = '  ',
int? maxTotalWidth,
bool includeHeader = true,
bool includeHeaderInWidth = true,
bool includeDivider = true,
String? headerStylePrefix = '\x1b[90m',
String? headerStyleSuffix = '\x1b[0m',

})`

Released under the MIT License.