obscureTextSegment method
Makes the segment
in a string unrecognizable by replacing all characters but spaces in this string with stars (default replacement
is '*')
Implementation
String obscureTextSegment(String segment, {String replacement = '*'}) {
if (this == null) {
return '';
}
return this!
.replaceAll(segment, segment.obscureText(replacement: replacement));
}