Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

how to check system environment variables in dart

import 'dart:io';

main(List<String> arguments) {
  print('Path: ${Platform.script.path}');
  print('dart: ${Platform.executable}');

  print('Env:');
  Platform.environment.keys.forEach((key) {
    print('${key} ${Platform.environment[key]}');
  });
}
 
PREVIOUS NEXT
Tagged: #check #system #environment #variables #dart
ADD COMMENT
Topic
Name
2+4 =