2024-07-09 16:34:45 +08:00

43 lines
1.8 KiB
Dart
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:star_lock/mine/valueAddedServices/valueAddedServicesSMSTemplate/valueAddedServicesAddSMSTemplate/newSMSTemplate_entity.dart';
class NewSMSTemplateState {
NewSMSTemplateState() {
if (Get.arguments != null) {
final Map map = Get.arguments;
currentTemplate.value = map['currentTemplate'];
currentTemplate.refresh();
templateNameTf.text = currentTemplate.value.name ?? '';
templateOneTf.text = currentTemplate.value.regards ?? '';
templateTwoTf.text = currentTemplate.value.tips ?? '';
channelType.value = currentTemplate.value.channelType ?? 0;
isUpdate.value = map['isUpdate'];
}
}
//高亮样式
final TextStyle highStyle =
TextStyle(color: const Color(0xFFEEDFA8), fontSize: 20.sp);
//默认样式
final TextStyle defaultStyle =
TextStyle(color: Colors.black, fontSize: 20.sp);
final TextEditingController templateOneTf = TextEditingController();
final TextEditingController templateTwoTf = TextEditingController();
final TextEditingController templateNameTf = TextEditingController();
RxBool isVip = false.obs;
RxList<TemplateData> templateList = <TemplateData>[].obs;
Rx<TemplateData> currentTemplate = TemplateData().obs; //当前模板信息
RxList<LangData> langTemplateList = <LangData>[].obs; //语言模板列表
RxInt selectedLangIndex = 0.obs; //选中的语言模板
RxInt selectedTemplateIndex = 0.obs; //选中的模板
RxBool isShowDate = false.obs; //是否显示日期
RxInt channelType = 0.obs; //1短信 2邮件
RxString preContent = ''.obs; //预览内容
RxBool isUpdate = false.obs; //是否是修改模板
}