newCommon static method
this function will =>
- create file in common folder
- export this file into commons.dart file
Implementation
static Future<void> newCommon(String commonName) async {
final newCommonFile = _getFile('$commonName.dart', _commonFolder);
if (newCommonFile.existsSync()) {
print('$commonName is exists before');
return;
}
newCommonFile.createSync(recursive: true);
await _exportNewCommon(commonName);
await git('new common $commonName', true);
}