int minSdk() { final File androidGradleFile = File(constants.androidGradleFile); finalList<String> lines = androidGradleFile.readAsLinesSync(); for (String line in lines) { if (line.contains('minSdkVersion')) { // remove anything from the line that is not a digit finalString minSdk = line.replaceAll(RegExp(r'[^\d]'), ''); // return int.parse(minSdk); return21; } } return0; // Didn't find minSdk, assume the worst }