getPanitTxtStyle static method

Map getPanitTxtStyle(
  1. Map obj
)

Implementation

static Map getPanitTxtStyle(Map obj){
  String id = '${obj['fontFamily']}-${obj['fontSize']}-${obj['fontWeight']}-${obj['color'].value}';
  if(strPainterStyle[id] == null){
    // print('$id 创建');
    strPainterStyle[id] = TextStyle(
      fontSize: obj['fontSize'],//字体大小
      fontFamily: obj['fontFamily'],//字体样式
      fontWeight: obj['fontWeight'],//字体粗细
      color:obj['color'],
      decoration:TextDecoration.none,
    );
  }else{
    // print('$id 已创建');
  }
  // print('id: ${id} 创建数量 ${strPainterStyle.keys.length}');
  return {'id':id,'style':strPainterStyle[id]};
}