argenius 1.1.1 copy "argenius: ^1.1.1" to clipboard
argenius: ^1.1.1 copied to clipboard

Library for parsing commandline arguments and using then with global scope or parse string commands on any other time

example/argenius_example.dart

import 'package:argenius/argenius.dart';

import 'global_example.dart';

/// To run example use command:
/// dart argenius_example.dart param1 --name1 value1 param2 --name2=value2

void main(List<String> args) {
  // Example 1.
  // Parse cmd arguments with using global argenus variable
  argenius.parse(args);
  // Try to use global argenius instance from child objects
  GlobalExample();

  print('Named arguments: ${argenius.named}');
  print('Ordered arguments: ${argenius.ordered}');

  // Example 2.
  // Create private instance of argenius and parse args on init
  Argenius privateArgenius = Argenius(args: args);

  // Example 3.
  // Parse arguments values some times later with parse method
  privateArgenius.parse(args);
}
0
likes
150
points
41
downloads

Publisher

verified publisherpaveltretyakov.ru

Weekly Downloads

Library for parsing commandline arguments and using then with global scope or parse string commands on any other time

Homepage
Repository (GitHub)

Documentation

API reference

License

MIT (license)

More

Packages that depend on argenius