dolumns 2.0.1 copy "dolumns: ^2.0.1" to clipboard
dolumns: ^2.0.1 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);
}
21
likes
155
points
3.32k
downloads

Publisher

verified publishermanichord.com

Weekly Downloads

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

Repository (GitHub)
View/report issues

Topics

#formatting #cli #strings

Documentation

API reference

License

BSD-3-Clause (license)

More

Packages that depend on dolumns