Skip to content
pubscout

barbecue

0.5.0, released 3 years ago by littlebat.dev

Render text tables for CLI-based Dart applications with custom borders, padding, and ANSI colors.

WASM-ready
$ flutter pub add barbecue
Source repository

What it does

Barbecue allows you to create and render text tables for command-line applications in Dart. It supports features like borders, padding, cell styling, text alignment, row and column spans, and ANSI colors.

AI-written summary of version 0.5.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You are building a command-line application in Dart and need to display tabular data.
  • You need styled output with custom borders, padding, and ANSI colors in your terminal.

Skip it when

  • You are building a Flutter GUI application rather than a command-line tool.
  • Your output relies heavily on unpredictable full-width or fractional-width unicode characters.

Strengths

  • Supports row and column spans, padding, and text alignment.
  • Customizable borders and ANSI color support.
  • Experimental support for emoji and wide characters.

Weaknesses

  • Relies on monospaced font assumptions which can break depending on the user's terminal font.
  • Limited support for emojis and other wide characters.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
4

Not documented

print(Table(
      tableStyle: TableStyle(border: true),
      body: TableSection(
        rows: [
          Row(cells: [
            Cell("42"),
            Cell("John Doe"),
          ]),
        ],
      )).render());

Alternatives

Packages that do the same job and could replace barbecue.

  • console

    Provides a robust set of tools and features for console and CLI applications in Dart.

Works with

Packages commonly used together with barbecue: ones it builds on, ones built on it, and its own family.