PageData class
class represent the data from web request returns.
Constructors
- PageData(String url, String html, {String? jsonData, String? defaultJsonId})
-
parse the html into object's document.
object's
jsonDatafirst come from the parameter'sjsonDataand decode it into json object. ifdefaultJsonIdis not null then get data from document that has id nameddefaultJsonId, otherwise set to null - PageData.auto(String url, dynamic content)
-
factory
- PageData.html(String url, String html)
- PageData.json(String url, dynamic jsonData)
Properties
- document ↔ Document?
-
the document that parse the html using html package.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- html → String
-
the html page.
final
- jsonData ↔ dynamic
-
the jsonData than in the html page that has the id
defaultJsonIdor the web request returns application/json data. or user parse that html page and get some jsondata.getter/setter pair - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- url → String
-
the url that web data comes from
final
Methods
-
getJsonDataById(
String? id) → dynamic -
get jsonData from document that has id named
idif not throw Exception. -
getRootElement(
) → PageNode - get the pageNode that represent the document's documentElement and jsonData.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
root(
) → PageNode - equal to getRootElement.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited