isHashtag static method

bool isHashtag(
  1. String term
)

Returns true if the String starts with "@" or "#" followed by one or more word-chacters only.

Implementation

static bool isHashtag(String term) =>
    RegExp(rHashtag).allMatches(term.trim()).length == 1;