Commit f05824dcaa2c1b2664833f12cb71da72f9789762

Authored by weixin_45529955
1 parent e6531640

修复语音致辞

@@ -212,9 +212,12 @@ class _VoiceWelcomeSettingPageState extends State<VoiceWelcomeSettingPage> { @@ -212,9 +212,12 @@ class _VoiceWelcomeSettingPageState extends State<VoiceWelcomeSettingPage> {
212 if (voiceInco != null && voiceInco.isNotEmpty) { 212 if (voiceInco != null && voiceInco.isNotEmpty) {
213 defaultVoiceText = voiceInco; 213 defaultVoiceText = voiceInco;
214 } 214 }
215 - //模板reserve字段为null时:被请人语音播报与预订人不一致默认选中、特殊用餐类型复选框默认开启;  
216 - //reserve字段有值时:被请人语音播报与预订人一致默认选中、特殊用餐类型复选框默认关闭  
217 - if (model.reserve == null) { 215 + //reserve为null,或reserve有值但voiceInco为null/空时:默认选中“不一致”、特殊用餐类型复选框默认开启;
  216 + //reserve有值且voiceInco有内容时:默认选中“一致”、特殊用餐类型复选框默认关闭
  217 + String? reserveVoiceInco = model.reserve?.voiceInco;
  218 + bool reserveVoiceIsEmpty =
  219 + reserveVoiceInco == null || reserveVoiceInco.trim().isEmpty;
  220 + if (model.reserve == null || reserveVoiceIsEmpty) {
218 guestVoiceSame = false; 221 guestVoiceSame = false;
219 specialVoiceEnabled = true; 222 specialVoiceEnabled = true;
220 } else { 223 } else {