Open Andregrps opened 3 years ago
I also found the same problem,Currently my project is null safety!
i have same problem!
Same problem.
any update?!
I found a solution. Thanks to @wangbax from here.
Just use this SIMPLE function in your flutter windows app
import 'dart:convert';
import 'dart:io';
Future<String> getBiosID() async {
String biosID = '';
final process = await Process.start(
'wmic',
['csproduct', 'get', 'uuid'],
mode: ProcessStartMode.detachedWithStdio,
);
final result = await process.stdout.transform(utf8.decoder).toList();
for (var element in result) {
final item = element.replaceAll(RegExp('\r|\n|\\s|UUID|uuid'), '');
if (item.isNotEmpty) {
biosID = item;
}
}
return biosID;
}
This will return the exact same result that the plugin does. Plus, it also removes the terminal window pop up.
Also you don't even need to use this platform_device_id
package.
The solution offered is valid for the following platforms: Windows, MacOS and Linux?
Is it only specifically Windows?
The solution offered is valid for the following platforms: Windows, MacOS and Linux?
Is it only specifically Windows?
The solution offered is valid for the following platforms: Windows, MacOS and Linux?
Is it only specifically Windows?
Tested on Windows 10/11, Ubuntu 20 and MacOS. Works well
When trying to get the device id from the windows desktop, a few seconds later it is crashing, and closing the application without showing any error log.
Currently my project is not null safety!