romantic_common 0.0.4 copy "romantic_common: ^0.0.4" to clipboard
romantic_common: ^0.0.4 copied to clipboard

Package including lot helpers for easy developing on dart language.

romantic_common #

build: status pub package style: analysis License: MIT

Package including lot helpers for easy developing on dart language.

Usage #

args #

argParse #

  • rule: (1) You need to configure the order of commands
class BrickFromCommand extends MasonCommandBase {
  /// construct throught [CommandAdapter]
  BrickFromCommand()
      : super(
          'bundleF',
          exampleKey,
          'Get brick template from bundle or dart.',
          ['bf', 'bundle_from'],
          ///<<<<<<<<<<<>>>>>>>>>>>
          [MasonParseEnum.bundlePath, MasonParseEnum.outputDir],
        );

(2) If the argument is option,(-xxx), you can use cli in any order

final derivedArgResult0 =
    command.argParser.parse(['--json-path', bundlePath, '-o', outdir.path]);
final argResult3 = command.argParser.parse([bundlePath, outdir.path]);
...
///>>>>>>

(3) The rest unmatched arguments will be matched sequentially with those configured in (1) but not matched in (2)

expect(derivedArgResult0.dict('bundle-path', -1), bundlePath);
expect(derivedArgResult0.dict('output-dir', -1), outdir.path);

expect(argResult3.dict('bundle-path', 0), bundlePath);
expect(argResult3.dict('output-dir', 1), outdir.path);

get propty util #

mixin MasonPropMixin on IArgument2Statistical<MasonParseEnum> {
  String get bundlePath => statistical.enumParse(MasonParseEnum.bundlePath);
/// in this example, bundlePath would be simple use to handle command.

Additional information #

TODO: Tell users more about the package: where to find more information, how to contribute to the package, how to file issues, what response they can expect from the package authors, and more.

0
likes
110
pub points
0%
popularity

Publisher

unverified uploader

Package including lot helpers for easy developing on dart language.

Repository (GitHub)
View/report issues
Contributing

Documentation

API reference

License

MIT (LICENSE)

Dependencies

args, cli_util, enum_to_string, fhir_yaml, path, recase, universal_io

More

Packages that depend on romantic_common