During the last weeks, I tried to learn a lot from Dart and Flutter, but even after a bit less than 1 month, I still don't know some basic stuff. When I was dealing with command line arguments parsing, I was thinking "how to get the goddamn program name". You know, the string you can simply have with argv[0] 1 in C or with the functions exported by the init module in Erlang. In Dart, you will require dart:io package and the Platform class.

Let write a small program to print out what kind of information this class store.

import 'dart:io' show Platform;

void main(List<String> arguments) {

final info = systemInfo();