Progressive web apps (PWA) are a hybrid of regular web pages (or websites) and a mobile application. This new application model attempts to combine features offered by most modern browsers with the benefits of mobile experience.
Warning: the API is experimental, and subject to change.
PWA is using ServiceWorkers:
Learn more about PWAs:
Articles about this packages:
Getting started
This library requires webdev installed locally. Install it using the command:
pub global activate webdev
Getting started: pwa_defaults
pwa
package and what it does.Additional offline urls: additional_offline_urls
Customize caching
Push notification
Typed Window <-> Worker communication, both Streams
and request-reply patterns, something like:
typedef Future<S> AsyncFunction<R, S>(R request);
typedef S WireAdapter<R, S>(R input);
abstract class MessageHub {
AsyncFunction<R, S> getFunction<R, S>(String type,
{WireAdapter<R, dynamic> encoder, WireAdapter<dynamic, S> decoder});
void setHandler<R, S>(String type, AsyncFunction<R, S> handler,
{WireAdapter<dynamic, R> decoder, WireAdapter<S, dynamic> encoder});
Sink<T> getSink<T>(String type, {WireAdapter<T, dynamic> encoder});
Stream<T> getStream<T>(String type, {WireAdapter<dynamic, T> decoder});
}
Push Notification