getSystemUserName function

String? getSystemUserName()

Get the logged in username in the machine.

Implementation

String? getSystemUserName() =>
    Platform.environment['USER'] ?? // Linux/macOS
    Platform.environment['USERNAME'];