device_manager.dart 381 B

12345678910111213141516171819202122
  1. class MyStorage {
  2. String? _cache;
  3. Future<bool> save(String text) async {
  4. _cache = text;
  5. return true;
  6. }
  7. Future<String?> read() async {
  8. return _cache;
  9. }
  10. }
  11. class DeviceManager {
  12. final storage = MyStorage();
  13. /// 获取授权的设备类型集合
  14. List<String> getAccessTypes() {
  15. return ["temp", "weight", "sugar", "spo2", "nibp"];
  16. }
  17. //DeviceInfo
  18. }