-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lost connection to device #21
Comments
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. |
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!
The text was updated successfully, but these errors were encountered: