NWRefresh class
Downloads JSON every every and saves values from it into fields, natively, while the app is closed.
refresh: NWRefresh(
url: 'https://api.example.com/weather?city={city}',
values: {'temp': 'current.temp', 'title#': 'items.#.title'},
),
- url may use
{key}of fields and options. With an option in it, each choice is downloaded and saved on its own. - values maps a field key to a path in the JSON: object keys and list
indexes separated by dots. For a repeated field,
#in both is the index ('title#': 'items.#.title'). - The system decides the exact time. iOS allows about 40–70 refreshes a
day, so every is at least 15 minutes; Android also wakes it then.
iOS only allows
httpsURLs.
Constructors
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited