appBuilder function
Builder
appBuilder(
- BuilderOptions options
Builder for the App
annotation.
Creates exactly one .g.dart file next to the file containing
the App
annotation.
Implementation
Builder appBuilder(BuilderOptions options) {
const ignoredLintRules = {
'unused_import',
'prefer_relative_imports',
'directives_ordering',
};
final headerParts = [
'// coverage:ignore-file',
'// ignore_for_file: type=lint',
'// ignore_for_file: ${ignoredLintRules.join(", ")}',
'\n$defaultFileHeader',
];
return LibraryBuilder(
AppGenerator(),
generatedExtension: '.directories.g.dart',
header: headerParts.join('\n'),
);
}