【问题标题】:Read/Write for Flutter App from SMB Server从 SMB 服务器读取/写入 Flutter 应用程序
【发布时间】:2022-01-03 08:32:20
【问题描述】:

有没有办法从 Flutter 应用程序读/写到 SMB 服务器? 我正在做一个个人项目,我尝试过 http/Dio 包,但不支持 SMB 协议。 请帮帮我。

  Future<void> _getData() async {
    var client = Dio();
    try {
      var serverPath = 'smb://192.168.1.30/';
      var response = await client.post(
        serverPath,
        data: {'user': 'username', 'password': 'password'},
      );
      var data = json.decode(utf8.decode(response.data));
      debugPrint('data $data');
    } catch (e) {
      debugPrint(e.toString());
    } finally {
      client.close();
    }
  }

【问题讨论】:

  • 你为什么不发布尝试过的代码?
  • @gretal 更新

标签: flutter server protocols smb


【解决方案1】:

您是否尝试过libdsm,并且您还需要在您的应用中嵌入http server

【讨论】:

  • 我有 libdsm 但我不知道如何在应用程序中创建一个 http 服务器,你能帮我吗?
猜你喜欢
  • 1970-01-01
  • 2017-10-13
  • 2022-12-19
  • 1970-01-01
  • 2020-01-04
  • 1970-01-01
  • 2019-07-26
  • 2021-07-15
  • 2022-09-24
相关资源
最近更新 更多