https://github.com/wiremoons/dav
Dart Application Version (DAV) - simple application version display for Dart CLI programs.
https://github.com/wiremoons/dav
cli command-line dart dart-library dart-package dartlang version
Last synced: about 1 year ago
JSON representation
Dart Application Version (DAV) - simple application version display for Dart CLI programs.
- Host: GitHub
- URL: https://github.com/wiremoons/dav
- Owner: wiremoons
- License: mit
- Created: 2023-02-11T13:20:27.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-11T20:52:53.000Z (almost 3 years ago)
- Last Synced: 2025-01-29T17:44:40.189Z (over 1 year ago)
- Topics: cli, command-line, dart, dart-library, dart-package, dartlang, version
- Language: Dart
- Homepage:
- Size: 316 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://pub.dev/packages/dav)
[](https://pub.dev/packages/dav/publisher)
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:
1. Use the `display()` call to output the version data to *stdout* for display on the command line;
2. 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
1. Add this package to your package's `pubspec.yaml` file as described on the installation tab:
2. Import the library:
```dart
import 'package:dav/dav.dart';
```
## Usage
The following usage is included in the `/example` folder as well, which can be run with: `dart run example/dav_example.dart`
```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();
}
```