setBundleId method
Sets the bundle ID in the Windows Runner.rc file.
Parameters:
bundleId
: The new bundle ID to be set.
Returns: Future<String?>, a success message indicating the change in bundle ID.
Implementation
@override
Future<String?> setBundleId({required String bundleId}) async {
final filePath = windowsAppRCPath;
List? contentLineByLine = await readFileAsLineByline(
filePath: filePath,
);
for (var i = 0; i < contentLineByLine.length; i++) {
if (contentLineByLine[i].contains('VALUE "InternalName"')) {
contentLineByLine[i] =
' VALUE "InternalName", "$bundleId" "\\0"';
}
}
final message = await super.setBundleId(bundleId: bundleId);
await writeFile(
filePath: filePath,
content: contentLineByLine.join('\n'),
);
return message;
}