state.dart 742 B

1234567891011121314151617181920212223242526
  1. import 'dart:collection';
  2. import 'package:get/get.dart';
  3. import 'package:vitalapp/store/store.dart';
  4. import 'models/menu.dart';
  5. class HomeState {
  6. final RxList<HomeMenuItem> _menuItems = RxList.empty();
  7. /// 版本号
  8. String get version => "1.0.0.100";
  9. /// 医生名称
  10. String get doctorName => Store.user.displayName;
  11. /// 团队名称
  12. String get doctorTeamName => Store.user.teamName;
  13. String get headImageToken => Store.user.headImageToken;
  14. // set headImageToken(String val) => _headImageToken.value = val;
  15. /// 菜单项集合
  16. List<HomeMenuItem> get menuItems => UnmodifiableListView(_menuItems.toList());
  17. set menuItems(Iterable<HomeMenuItem> val) =>
  18. _menuItems.value = List<HomeMenuItem>.from(val).obs;
  19. }