getBundleId method
Fetches the bundle ID from the Windows Runner.rc file.
Returns: Future<String?>, the bundle ID if found, null otherwise.
Implementation
@override
Future<String?> getBundleId() async {
final filePath = windowsAppRCPath;
var contentLineByLine = await readFileAsLineByline(
filePath: filePath,
);
for (var i = 0; i < contentLineByLine.length; i++) {
if (contentLineByLine[i]?.contains('VALUE "InternalName"') ?? false) {
var match = RegExp(r'VALUE "InternalName", "(.*?)"')
.firstMatch(contentLineByLine[i]!);
return match?.group(1)?.trim();
}
}
return null;
}