将其他类型转换为String
static String safeToString(dynamic source, {String? def}) { return source?.toString() ?? def ?? ""; }