Reputation: 101
I need to get the pid of current processs on flutter, but I cann't find any static method in Process.dart, how to get it?
Upvotes: 10
Views: 2313
Reputation: 1929
Import dart:io
and use the pid
property.
import 'dart:io';
...
print('pid: $pid');
https://api.dart.dev/stable/2.13.4/dart-io/Process/pid.html
https://api.flutter.dev/flutter/dart-io/pid.html
Upvotes: 7