【问题标题】:Flutter Desktop run Powershell commandsFlutter Desktop 运行 Powershell 命令
【发布时间】:2021-05-30 23:56:22
【问题描述】:

我想问一下是否可以使用 Flutter Desktop for Windows 运行 PowerShell 代码。 我在 pub.dev 上找到了包 process_run。 有了它,我可以运行 Shell 命令,但我必须做一个解决方法并用它启动一个 PowerShell 命令。 有没有直接发送 PowerShell 命令的方法?

【问题讨论】:

    标签: flutter


    【解决方案1】:

    在同一个仓库中有一个issue 询问有关 Powershell 的问题

    根据回购所有者的回答,您可以执行以下操作:

    // You can run a command
    await shell.run('powershell -c "pwd"');
    // You can run a power shell script
    await shell.run('powershell script.ps1');
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-02-16
      • 1970-01-01
      • 2016-05-18
      • 2020-02-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多