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
130
pub points
1%
popularity

Publisher

verified publisherpaveltretyakov.ru

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

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

More

Packages that depend on argenius