findMainActivity method
Implementation
Future<File?> findMainActivity({String type = 'java'}) async {
var files = await dirContents(Directory(PATH_ACTIVITY + type));
String extension = type == 'java' ? 'java' : 'kt';
for (var item in files) {
if (item is File) {
if (item.path.endsWith('MainActivity.' + extension)) {
return item;
}
}
}
return null;
}