IconsCommand constructor
IconsCommand()
The command used to run the IconsGenerator.
Implementation
IconsCommand() : super('./icons.g.dart') {
argParser
..addOption(
'encoding',
help: 'The encoding used for reading the `.json` and `.yaml` files. '
'Defaults to `utf-8`.',
)
..addOption(
'font-export-path',
abbr: 'f',
help: 'The path to export generated font to. '
'Defaults to `icons.ttf` in the current working directory.',
defaultsTo: './icons.ttf',
)
..addOption(
'base-name',
abbr: 'b',
help: 'The name of the generated class. Defaults to `Icons`.',
)
..addOption(
'font-family',
abbr: 'a',
help: 'The name of the font specified in pubspec.yaml. '
'Defaults to `Icons`.',
)
..addOption(
'base-code-point',
abbr: 'o',
help: 'The starting code point for referencing icons. '
'Defaults to `0xf101`.',
)
..addOption(
'height',
abbr: 't',
help: 'The height of the heighest icon.',
)
..addOption(
'descent',
abbr: 'd',
help: 'The descent is usefull to fix the font baseline. '
'Defaults to `0`.',
)
..addFlag(
'normalize',
abbr: 'n',
help: 'If the icons should be normalized by scaling them to the height '
'of the highest icon. Defaults to `false`.',
defaultsTo: null,
)
..addOption(
'package',
abbr: 'p',
help:
'A path to the js package to run npm install or yarn install with. '
'Defaults to package with `fantasticon: ^1.2.3`.',
)
..addFlag(
'convert',
abbr: 'c',
help: 'If the icon names should be converted to camel case. Disabling '
'this option will prevent any changes to be made to the icon '
'names. Be certain to pass valid Dart names or the generation will '
'be likely to fail. Defaults to `true`',
defaultsTo: null,
)
..addFlag(
'yarn',
abbr: 'y',
help: 'If the package should be installed with yarn instead of npm. '
'Defaults to `false`.',
defaultsTo: null,
)
..addFlag(
'force',
abbr: 'r',
help: 'If the package should be installed forcefully. Otherwise, if '
'fantasticon executable is present, installation is ommited. '
'Defaults to `false`.',
defaultsTo: null,
);
}