parse method
Implementation
@override
parse() {
String pattern = r"[\w-\.]+@([\w-]+\.)+[\w-]{2,4}";
RegExp regExp = RegExp(pattern);
Iterable<RegExpMatch> allMatches = regExp.allMatches(text);
List<Link> links = <Link>[];
for (RegExpMatch match in allMatches) {
links.add(Link(regExpMatch: match, type: email));
}
return links;
}