验证MAC地址
bool isMACAddress(String? mac) { const pattern = r'^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$'; return hasMatch(mac, pattern); }