验证MAC地址
static bool isMacAddress(String? mac) { if (mac?.isEmpty ?? true) return false; final regex = RegExp(r'^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$'); return regex.hasMatch(mac!); }