addFlagCsp method

void addFlagCsp({
  1. bool defaultsTo = false,
})

Adds a CSP flag for content security policy.

Disable dynamic generation of code in the generated output. This is necessary to satisfy CSP restrictions (see http://www.w3.org/TR/CSP/).

Defaults to false.

Example:

argParser.addFlagCsp(defaultsTo: true);

Implementation

void addFlagCsp({bool defaultsTo = false}) {
  addFlag(
    'csp',
    help:
        'Disable dynamic generation of code in the generated output. This is necessary to satisfy CSP restrictions (see http://www.w3.org/TR/CSP/).',
    defaultsTo: defaultsTo,
  );
}