ByteNote LogoByteNote

Navigation

  • Blog
  • 工具

    © 2025 ByteNote. All rights reserved.

    Flutter Class 的get 和 set

    Jul 30, 20227 min read
    main(List<String> args) {
      final p = Person();
    
      // 直接访问属性
      p.name = "why";
      print(p.name);
    
      // 通过getter和setter访问
      p.name = "lilei";
      print(p.name);
    }
    
    
    class Person {
      String name;
    
      // setter
      set name(String name) => this.name = name;
      // getter
      String get name => name;
    }
    

    相关文章

    三网回程测速测试脚本

    该脚本提供了三网回程测速功能,用户可以选择不同的测速类型,并显示详细的服务器信息、上传下载速度及延迟。

    Ubuntu完全卸载删除Docker

    Ubuntu系统中完全卸载删除Docker的步骤包括查看安装的软件包、执行卸载命令以及进行系统清理。

    解决 ZeroTier ERROR: unable to configure virtual network port

    导致 ZeroTier 出现 "ERROR: unable to configure virtual network port" 的可能原因包括权限、防火墙和网络适配器问题,解决方法涉及以管理员身份运行、调整防火墙设置和检查网络适配器配置,必要时可重新安装或联系支持团队。

    什么是dangling , 示例

    "Dangling"文件或目录是指在文件系统中失去了与其物理存储设备上位置关联的条目,变得无意义且无法访问。

    Go Azure Speech Websocket Edge 接口实现文本转语音

    该代码实现了一个使用Go语言和Azure Speech Websocket Edge接口将文本转换为语音的功能,通过WebSocket连接发送SSML标记的文本,并接收生成的音频数据。