parse static method

AngelCompanyUrl? parse(
  1. String url
)

Implementation

static AngelCompanyUrl? parse(String url) {
  var matches = RegExp(
          r'(?:https?:)?\/\/angel\.co\/company\/(?<company>[A-z0-9_-]+)(?:\/(?<company_subpage>[A-z0-9-]+))?')
      .allMatches(url);
  var company = matches.getValue("company");
  var subPage = matches.getValue("company_subpage");
  if (company == null) return null;
  return AngelCompanyUrl._(company, subPage);
}