dolumns

Creator: coderz1093

Last updated:

0 purchases

dolumns Image
dolumns Images

Languages

Categories

Add to Cart

Description:

dolumns

A library for formatting text output into columns.

Usage #
A simple usage example:
import 'package:dolumns/dolumns.dart';

main() {
final columns = dolumnify([
['provider', '4.0.2'],
['http', '0.12.0+4'],
['shared_preferences', '0.5.6+1'],
['sentry', '3.0.1'],
]);
print(columns);
}
copied to clipboard
will output:
provider 4.0.2
http 0.12.0+4
shared_preferences 0.5.6+1
sentry 3.0.1
copied to clipboard
You can also supply a custom column splitter, (...], columnSplitter: ' | '); will give:
provider | 4.0.2
http | 0.12.0+4
shared_preferences | 0.5.6+1
sentry | 3.0.1
copied to clipboard
Columns with headers are possible with a custom header separator, provide the header in the first list item:
import 'package:dolumns/dolumns.dart';

main() {
final columns = 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(columns);
}
copied to clipboard
will output:
PACKAGES | VERSION
=============================
provider | 4.0.2
http | 0.12.0+4
shared_preferences | 0.5.6+1
sentry | 3.0.1
copied to clipboard
see dolumns_example.dart example file for full details.
Note you can pass in objects of any type, dolumn will call toString() on every object passed in.
API inspired by the columinfy npm package.
Features and bugs #
Please file feature requests and bugs at the issue tracker.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.