state.dart 634 B

12345678910111213141516171819202122232425
  1. import 'package:get/get.dart';
  2. import '../../../../common/models/index.dart';
  3. class SpeechAssistantChatState {
  4. // title
  5. final _title = "".obs;
  6. set title(value) => _title.value = value;
  7. get title => _title.value;
  8. final _btnTitle = "".obs;
  9. set btnTitle(String value)=> _btnTitle.value = value;
  10. String get btnTitle => _btnTitle.value;
  11. // 当前状态
  12. Rx<SpeechStatus> status = Rx<SpeechStatus>(SpeechStatus.idle);
  13. // 随机展示命令列表
  14. final RxList<String> initCommandList = <String>[].obs;
  15. // 对话列表
  16. final RxList<ImSpeechAssistantResponse> chatList = <ImSpeechAssistantResponse>[].obs;
  17. }