appendLocatorFeature method
void
appendLocatorFeature()
Implementation
void appendLocatorFeature(
String pathFeature,
String featureName,
String pageName,
String className,
String methodName,
) {
final path = join(pathFeature, 'lib');
String data = File(join(path, 'locator.dart')).readAsStringSync();
data = data.replaceAll(RegExp(r'\n?void\s\w+\(\)\s{', multiLine: true),
'''import '$pageName/locator.dart';
void setupLocatorFeature${featureName.pascalCase}() {''');
data = data.replaceAll(
RegExp(r'}\n$', multiLine: true), ''' setupLocator$className();
}''');
join(path, 'locator.dart').write(data);
StatusHelper.generated(join(path, 'locator.dart'));
}