extractState method

String extractState()

Implementation

String extractState() {
  Uri uri = Uri.parse(url);

  if (uri.host.contains('rs.gov.br') && (hasNFE || hasNFCE || hasNFC)) {
    return 'RS';
  }

  // Add more conditions for other states' URLs
  // ...

  return 'UNKNOWN';
}