Site icon Flutter Packages | Pub dev Packages – Flutter Mobile App World

Dart Application Version (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:

Different data is displayed to distiguish a AOT complied application from one runing as a Dart script. The displayed differences includes:

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:
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

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();
}

Contribute and/or download to this package on GitHub

Exit mobile version