ToXmlCommand constructor Null safety

ToXmlCommand()

Implementation

ToXmlCommand() : super('to_xml', 'Put localization from source to xml') {
  argParser
    ..addOption(
      _argFrom,
      abbr: 'f',
      help: 'Source to export string for translation to xml.',
      valueHelp: 'SOURCE',
      allowed: [
        _sourceArb,
        _sourceJson,
        _sourceIos,
      ],
      allowedHelp: {
        _sourceArb: 'Export from project arb files.',
        _sourceJson: 'Export from JSON (server localization). '
            'Require parameter $_argSource',
        _sourceIos: 'Export from .strings iOS localization files. '
            'All not empty files for all projects will be exported.',
      },
      defaultsTo: _sourceArb,
    )
    ..addOption(
      _argSource,
      abbr: 's',
      help: 'Directory of source localization files. '
          'Supported by sources: $_sourceJson',
      valueHelp: 'DIR_PATH',
    )
    ..addOption(
      _argLocale,
      abbr: 'l',
      help: 'Locale to export. By default this is '
          'base_locale_for_xml from alex configuration.',
      valueHelp: 'DIR_PATH',
    );
}