Last updated:
0 purchases
romantic common
romantic_common #
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],
);
copied to clipboard
(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]);
...
///>>>>>>
copied to clipboard
(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);
copied to clipboard
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.
copied to clipboard
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.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.