maskMiddleOr method
maskMiddle 的空值安全版:null / 空串返回 fallback(默认 '')。
Implementation
String maskMiddleOr({
String fallback = '',
int head = 0,
int tail = 0,
String placeholder = '****',
}) {
final s = this;
if (s == null || s.isEmpty) return fallback;
return s.maskMiddle(head: head, tail: tail, placeholder: placeholder);
}