StringMaskExtension extension

String masking extensions for phone numbers, emails, and generic values.

on

Methods

mask({int visibleStart = 2, int visibleEnd = 2, String maskChar = '*', bool maskIfShorter = false}) String

Available on String?, provided by the StringMaskExtension extension

Masks the middle of a string, revealing visibleStart characters from the start and visibleEnd characters from the end.
maskEmail({int visibleStart = 1, int visibleEnd = 0, String maskChar = '*', bool maskDomain = false, int domainVisibleStart = 0, int domainVisibleEnd = 0, bool maskIfShorter = false}) String

Available on String?, provided by the StringMaskExtension extension

Masks the local part of an email address before @.
maskPhone({int visibleStart = 2, int visibleEnd = 4, String maskChar = '*', bool keepPlusPrefix = true, bool maskIfShorter = false, String? separator}) String

Available on String?, provided by the StringMaskExtension extension

Masks a phone number after stripping non-digit characters.