init method
void
init()
Implementation
void init() {
final YamlMap? options = config.configFileOptions;
if (options != null) {
final List<dynamic>? replace = options['replace'] as List<dynamic>?;
if (replace != null) {
for (final dynamic item in replace) {
final Map<dynamic, dynamic> map = item as Map<dynamic, dynamic>;
final String from = map['from'] as String? ?? '';
final String to = map['to'] as String? ?? '';
itemMap[from] = RegexItem(from: from, to: to);
}
}
}
itemMap.putIfAbsent('/', () => const RegexItem(from: '/', to: '_'));
itemMap.putIfAbsent('.', () => const RegexItem(from: '.', to: '_'));
itemMap.putIfAbsent(' ', () => const RegexItem(from: ' ', to: '_'));
itemMap.putIfAbsent('-', () => const RegexItem(from: '-', to: '_'));
itemMap.putIfAbsent('@', () => const RegexItem(from: '@', to: '_AT_'));
}