createExampleContent static method
Implementation
static String createExampleContent() {
final settings = Settings(
include: ['**/*.dart'],
exclude: ['**/*.g.dart'],
defaultSettings: DefaultSettings(
fileName: '# defaults to directory name',
),
dirs: [
DirectorySettings(
dirPath: 'lib',
exports: [
ExportSettings(
export: 'package:equatable/equatable.dart',
show: ['Equatable'],
),
],
include: [
ExportSettings(
export: 'src/letters.dart',
hide: ['A', 'B', 'C'],
),
],
exclude: ['src/numbers.dart'],
),
],
);
final json = settings.toJson();
json.remove('line_break');
json['dirs'][0]['include'] = [
'src/loz.dart',
// ignore: not_iterable_spread
...json['dirs'][0]['include'],
];
json['dirs'][0]['exports'] = [
'package:mario/mario.dart',
// ignore: not_iterable_spread
...json['dirs'][0]['exports'],
];
// make sure that it can still be parsed
Settings.fromJson(json);
final yaml = json2yaml(json);
return yaml;
}