Daisy caf62a7413 1,新增自定义短信模版列表接口对接
2,新增获取默认短信模版接口对接及相应逻辑处理
3,新增电子钥匙、密码模版相关逻辑及布局处理
4,新增添加短信模版(电子钥匙、密码)接口对接
5,修复新建短信模版点击报错不能展示问题
2024-06-04 14:44:04 +08:00

58 lines
2.4 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 {
//高亮样式
final TextStyle highStyle =
TextStyle(color: const Color(0xFFEEDFA8), fontSize: 20.sp);
//默认样式
final TextStyle defaultStyle =
TextStyle(color: Colors.black, fontSize: 20.sp);
//预览样式封装-密码
// late InlineSpan passwardSpan = TextSpan(children: <InlineSpan>[
// TextSpan(
// text:
// '${TranslationLoader.lanKeys!.hello!.tr}\n${TranslationLoader.lanKeys!.yourRoomIs!.tr}',
// style: defaultStyle),
// TextSpan(text: '201', style: highStyle),
// TextSpan(
// text: ' ${TranslationLoader.lanKeys!.theCodeToOpenTheDoorIs!.tr} ',
// style: defaultStyle),
// TextSpan(text: '332211\n', style: highStyle),
// TextSpan(
// text: '${TranslationLoader.lanKeys!.periodValidity!.tr} ',
// style: defaultStyle),
// TextSpan(text: '2021.12.11 12:00 - 2021.12.12 13:00。\n', style: highStyle),
// TextSpan(
// text: TranslationLoader.lanKeys!.templateTip1!.tr, style: defaultStyle),
// ]);
//预览样式封装-电子钥匙
// late InlineSpan electronicKeySpan = TextSpan(children: <InlineSpan>[
// TextSpan(
// text:
// '${TranslationLoader.lanKeys!.hello!.tr}\n${TranslationLoader.lanKeys!.templateTip2!.tr}',
// style: defaultStyle),
// TextSpan(text: 'https://abc.com/bcd\n', style: highStyle),
// TextSpan(
// text: '${TranslationLoader.lanKeys!.templateTip3!.tr}\n',
// style: defaultStyle),
// TextSpan(text: 'https://abc.com/bcd', style: highStyle),
// ]);
final TextEditingController templateOneTf = TextEditingController();
final TextEditingController templateTwoTf = TextEditingController();
final TextEditingController templateNameTf = TextEditingController();
RxBool isVip = false.obs;
RxList<SMSTemplateData> templateList = <SMSTemplateData>[].obs;
RxString templateTypeText = '电子钥匙'.tr.obs;
RxString templateContentText = ''.obs; //模版内容
Rx<SMSTemplateData> currentTemplate = SMSTemplateData().obs;
RxBool isShowDate = false.obs;
}