Search packages, repositories and app categories

Package detailsv1.2.0

pwa_info

PWA INFO PACKAGE

AndroidiOSWebmacOSWindowsLinux
30-day downloads
85
Likes
2
Pub points
150

Install package

flutter pub add pwa_info

Package Overview

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

The pwa_info package provides utilities to detect and retrieve information about a Progressive Web App (PWA) environment across multiple platforms. It enables developers to check if the current app is running as a PWA, access PWA-specific metadata such as manifest details, and determine installation status on supported platforms. This helps tailor user experiences based on whether the app is launched from a browser or installed as a standalone PWA. The package supports Android, iOS, Web, macOS, Windows, and Linux, making it ideal for cross-platform web applications aiming to enhance PWA functionality.

Use cases

  • Detecting PWA installation status
  • Accessing PWA manifest data
  • Customizing UI based on PWA context
  • Enabling offline capabilities
  • Supporting cross-platform PWA apps
  • Improving user engagement with PWA features

Key features

  • Cross-platform compatibility
  • Manifest data retrieval
  • Installation status detection
  • Simple API integration
  • Supports all major platforms
  • Lightweight and efficient

Suitable for

  • Developers building PWAs
  • Apps requiring PWA-specific logic
  • Cross-platform web applications
  • Projects targeting multiple OS environments
  • Teams using Flutter for web and mobile

Considerations

  • Requires web platform support
  • Limited to PWA-specific checks
  • No runtime configuration options
  • Depends on browser PWA APIs
  • Not suitable for native-only apps
  • May not work in all embedded WebView scenarios

Original README

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

pwa_info

A Flutter package for detecting device and browser information in Progressive Web Apps (PWAs).

pub package License

Features

  • OS detection — identify iOS, Android, or other platforms
  • Browser detection — detect Chrome, Safari, Firefox, Edge, Opera, Samsung Internet
  • Mobile check — determine if the device is mobile
  • PWA standalone mode — check if running as a standalone PWA
  • User agent — access the raw user agent string

Installation

Add pwa_info to your pubspec.yaml:

dependencies:
  pwa_info: ^1.2.0

Then run:

flutter pub get

Usage

import 'package:pwa_info/pwa_info.dart';

final info = PwaInfo();

// Operating system
print(info.os); // DeviceOS.ios, DeviceOS.android, or DeviceOS.other

// Browser
print(info.browser); // BrowserName.chrome, BrowserName.safari, etc.

// User agent string
print(info.userAgent); // "Mozilla/5.0 (iPhone; CPU iPhone OS ..."

// Mobile check
print(info.isMobile); // true or false

// PWA standalone check
print(info.isStandalone); // true if running in standalone mode

// Get everything at once
final result = info.all;
print(result);

API

PwaInfo
Member Type Description
os DeviceOS Detected operating system
browser BrowserName Detected browser
userAgent String Raw user agent string (lowercased)
isWeb bool Whether running on web (kIsWeb)
isMobile bool Whether the device is mobile
isStandalone bool Whether running in PWA standalone mode
all PwaInfoResult All properties as a single object
DeviceOS
Value Description
ios iPhone or iPad
android Android device
other Desktop or unknown
BrowserName
Value Description
chrome Google Chrome
safari Apple Safari
firefox Mozilla Firefox
edge Microsoft Edge
opera Opera
samsungInternet Samsung Internet Browser
unknown Unrecognized browser

Example

See the example directory for a complete Flutter web app.

License

This project is licensed under the BSD 3-Clause License — see the LICENSE file for details.

Categories

Dependencies

Dependency list 1 items

Source repository

Projects using this package

No data available yet.