Search packages, repositories and app categories

Package detailsv0.2.1

pwa

Progressive Web App library

30-day downloads
97
Likes
23
Pub points
20

Install package

flutter pub add pwa

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

The pwa package is a Flutter library designed to help developers build Progressive Web Apps (PWAs) with ease. It provides tools and utilities to enhance web app capabilities, such as offline support, push notifications, and installability. By integrating this package, developers can deliver app-like experiences through the web, leveraging modern web standards. It's particularly useful for projects aiming to reach users across devices without requiring native app distribution. The library supports seamless integration into Flutter web projects.

Use cases

  • Building installable web applications
  • Enabling offline functionality
  • Implementing push notifications
  • Creating app-like web experiences
  • Enhancing web performance

Key features

  • Offline support via service workers
  • Push notification integration
  • Web app manifest generation
  • Installability on desktop and mobile
  • Seamless Flutter web integration

Suitable for

  • Web-focused Flutter developers
  • Projects targeting broad device compatibility
  • Developers seeking PWA features without native code
  • Apps needing offline access
  • Cross-platform web application development

Considerations

  • Requires a web deployment environment
  • Limited platform-specific features compared to native apps
  • May need additional configuration for advanced PWA behaviors
  • Best suited for web-only or web-first applications
  • Depends on browser support for PWA features

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

Progressive Web App (PWA) for Dart

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.

Background

PWA is using ServiceWorkers:

Learn more about PWAs:

Articles about this packages:

Tutorial and Examples

Getting started

NOTE:

This library requires webdev installed locally. Install it using the command:

pub global activate webdev

  • Getting started: pwa_defaults

    • Shows you how to use the pwa package and what it does.
    • Enables offline asset caching for you web app out-of-the-box.
  • Additional offline urls: additional_offline_urls

    • Show you how to create the entry point for customization.
    • Gives you the ability to add additional URLs for the offline cache.

Customize caching

  • Custom routes: custom_routes
    • Familiarize yourself with caching and routes.
    • Customize cache behavior for different parts of your app.

Push notification

  • Push notification: push_notification
    • Check and/or request Push permission.
    • Trigger and handle push event, show notification.

Planned features

  • 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

    • notification for the client app
    • one-method registration and/or status request

Categories

Dependencies

Dependency list 5 items

Source repository

Projects using this package

No data available yet.