imt_para method

Function imt_para(
  1. String template,
  2. String value
)

Implementation

Function imt_para(String template, String value) {
  // 调用模板:imt_para("已选:{{addType}}",'已选:$addType')(addType: addType)
  final originTemplate = template.replaceAllMapped(
      expForParameterOut, (Match m) => replaceParameterForTemplate(m));
  final originKey = zhMapRevert[originTemplate] ??
      getKeyFromMap(zhMap, originTemplate) ??
      "";
  final Function translatedValueFunction = t[originKey] ?? textErrorFunction;
  return translatedValueFunction;
}