parseFile method

  1. @override
Future<ApkInfo?> parseFile(
  1. File file
)
override

Implementation

@override
Future<ApkInfo?> parseFile(File file) async {
  final aaptPath = _aaptPath;
  if ((aaptPath ?? '').isEmpty) {
    throw Exception('aapt not found');
  }
  final ProcessResult processResult = await Process.run(
    aaptPath!,
    ['dump', 'badging', file.path],
    stdoutEncoding: utf8,
    stderrEncoding: utf8,
  );
  final String resultString = processResult.stdout;
  return parseString(file, resultString);
}