Skip to content
pubscout

connectivity_wrapper

2.0.1, released 6 days ago by dart.nonstopio.com

Provides network-aware widgets and connectivity feedback for Flutter applications.

Uses material_ui
$ flutter pub add connectivity_wrapper
Source repository

What it does

A Flutter package that offers network-aware widgets to give users feedback when they are offline or when connectivity is lost. It integrates with provider and connectivity_plus to monitor network changes and update UI elements accordingly.

AI-written summary of version 2.0.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You want to display a banner or overlay when the user loses internet connection.
  • You need to disable specific UI components (like sign-in buttons) when offline.
  • You want a simple declarative way to handle network-aware widgets app-wide or per-screen.

Skip it when

  • You need complex network state management beyond simple online/offline UI feedback.
  • You are relying solely on connectivity state for making critical network calls without timeout handling.

Strengths

  • Easy setup for global or per-screen offline feedback via wrapper widgets.
  • Supports custom offline widgets, messages, and decorations.
  • Built-in handling of subscription disposal and resource cleanup.

Weaknesses

  • Depends on the underlying platform connectivity checks which may occasionally give false positives.
  • Requires specific platform configurations (such as Android Gradle Plugin, Java 17, and iOS 13+ for v2.0.0).

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
3

Requires Dart 3.6+ and updates to platform settings such as Java 17, Android Gradle Plugin 8.12.1+, Gradle 8.13+, iOS 13+, and macOS 10.15+ for connectivity_plus 7.x compatibility.

ConnectivityAppWrapper(
  app: MaterialApp(
    home: MenuScreen(),
    builder: (buildContext, widget) {
      return ConnectivityWidgetWrapper(
        child: widget,
        disableInteraction: true,
        height: 80,
      );
    },
  ),
)

Alternatives

Packages that do the same job and could replace connectivity_wrapper.

Works with

Packages commonly used together with connectivity_wrapper: ones it builds on, ones built on it, and its own family.