getCodeAndName static method
获取已拼接的code和name
code 代码
name 名称
textNull 为空时展示内容
Implementation
static String getCodeAndName(
String? code,
String? name, {
String textNull = '',
}) {
if (code is! String && name is! String) {
return textNull;
} else {
return (code is String ? '[ $code ] ' : '') + (name ?? '');
}
}