dolumns 1.2.0
dolumns: ^1.2.0 copied to clipboard

A Dart library for formatting text output into columns. Useful for printing tabular data in a terminal.

example/dolumns_example.dart

import 'package:dolumns/dolumns.dart';

void main() {
  print('<<Basic Table>>\n');
  final columns = dolumnify([
    ['provider', '4.0.2'],
    ['http', '0.12.0+4'],
    ['shared_preferences', '0.5.6+1'],
    ['sentry', '3.0.1'],
  ], columnSplitter: ' | ');
  print(columns);

  print('\n<<Table With Headers>>\n');
  final columns2 = dolumnify([
    ['PACKAGES', 'VERSION'],
    ['provider', '4.0.2'],
    ['http', '0.12.0+4'],
    ['shared_preferences', '0.5.6+1'],
    ['sentry', '3.0.1'],
  ], columnSplitter: ' | ', headerIncluded: true, headerSeparator: '=');
  print(columns2);

  print('\n<<Table With Multi-Character Header Separator>>\n');
  final columns3 = dolumnify([
    ['PACKAGES', 'VERSION'],
    ['http', '0.12.0+4'],
    ['shared_preferences', '0.5.6+1'],
  ], columnSplitter: ' | ', headerIncluded: true, headerSeparator: '/\\');
  print(columns3);
}
4
likes
95
pub points
67%
popularity

Publisher

manichord.com

A Dart library for formatting text output into columns. Useful for printing tabular data in a terminal.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

More

Packages that depend on dolumns