Decoder class
The Decoder class is responsible for orchestrating the entire scraping process for an NFE.
It performs the following tasks in sequence:
- Constructs the actual URL to be scraped using the URLBuilder.
- Fetches the HTML content of the constructed URL using the HTTPClient.
- Determines the state from the provided URL using the URLStateExtractor.
- Delegates the scraping process to the appropriate scraper via ScraperFactory.
- Returns the scraped NFE object.
Example usage:
var decoder = Decoder('some_nfe_url');
var nfe = await decoder.scrapeNfe();
print(nfe);
Note: The URLs provided in the example at the bottom are typical NFE URLs from the RS state.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- httpClient → HTTPClient
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scraper ↔ BaseScraper?
-
getter/setter pair
- urlBuilder → URLBuilder
-
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
scrapeNfe(
) → Future< NFE> - Initiates the NFE scraping process.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited