0 purchases
dav
Dart package for command line applications to create an version display.
Features #
The package displays a summary of version data for a command line application. The version data it
provides includes:
the stated version number for your application;
the version of the operating system the application is being run on;
the number of CPUs available in the machine the application is being run on;
the system locale for the machine being run on;
the name of the local computer the application is being run on.
Different data is displayed to distiguish a AOT complied application from one runing as a Dart script. The
displayed differences includes:
Last time the script was modified vs when the applcation was built (ie AOT compiled);
Version of Dart being used to execute the script vs Version of Dart the application was AOT complied with;
Simple usage provides two options for application version output:
Use the display() call to output the version data to stdout for display on the command line;
Use the asString() call to get a string copy of the version data - in case further manipluation is needed prior to output.
Easy to use, with no addtional external dependencies. Only uses the Dart SDK builtin module: dart:io.
Screen Shots #
Below are two screen example outputs:
Getting started #
Add this package to your package's pubspec.yaml file as described on the installation tab:
Import the library:
import 'package:dav/dav.dart';
copied to clipboard
Usage #
The following usage is included in the /example folder as well, which can be run with: dart run example/dav_example.dart
import 'package:dav/dav.dart';
void main() {
// Create a new object named 'version' from the class 'Dav' setting this applications version to '0.3.1':
final version = Dav(appVersion: "0.3.1");
// display the version informaiton to the screen (stdout)
version.display();
}
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.