Git Product home page Git Product logo

Comments (8)

Dusk-afk avatar Dusk-afk commented on June 5, 2024 7

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.

from platform_device_id.

nikitatg avatar nikitatg commented on June 5, 2024 4

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

from platform_device_id.

Dusk-afk avatar Dusk-afk commented on June 5, 2024 1

The solution offered is valid for the following platforms: Windows, MacOS and Linux?

Is it only specifically Windows?

  • Tested on windows (working like a charm)
  • I don't know about Linux
  • Pretty sure it's not gonna work on macOS (edit: Working on MacOS as well)

from platform_device_id.

zhibaiwei avatar zhibaiwei commented on June 5, 2024

I also found the same problem,Currently my project is null safety!

from platform_device_id.

Ali-Fadaei avatar Ali-Fadaei commented on June 5, 2024

i have same problem!

from platform_device_id.

iommi87 avatar iommi87 commented on June 5, 2024

Same problem.

from platform_device_id.

Ali-Fadaei avatar Ali-Fadaei commented on June 5, 2024

any update?!

from platform_device_id.

DomingoMG avatar DomingoMG commented on June 5, 2024

The solution offered is valid for the following platforms: Windows, MacOS and Linux?

Is it only specifically Windows?

from platform_device_id.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.