Skip to content
pubscout

common_utils2

4.0.1, released 7 weeks ago by innocentdiwe.qzz.io

Production-focused Flutter utilities for notifications, storage, connectivity, and media.

Uses material_ui
$ flutter pub add common_utils2
Source repository

What it does

A comprehensive utility package providing pre-configured services for push and local notifications, secure storage, Hive CE, connectivity checking, validation, and media/file pickers. It bundles common everyday extensions and helpers for production apps.

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

Use it when

  • You are building a production Flutter app and want a pre-packaged set of utilities for notifications, storage, and common validations.
  • You need an integrated solution for push/local notifications with deep-link handling and per-category mute preferences.

Skip it when

  • You only need a single lightweight utility (like url_launcher or crypto) and want to avoid pulling in a large dependency graph.
  • Your project does not use Flutter 3.47+ or Dart 3.13+.

Strengths

  • Combines many essential production utilities into a single, cohesive package.
  • Built-in support for per-category notification mute, cold-start taps, and in-app notification overlays.
  • Type-safe Result and AsyncState types for robust error handling.

Weaknesses

  • Large dependency footprint due to covering multiple domains (storage, media, notifications, location).
  • Strict minimum requirement of Flutter 3.47 and Dart 3.13.

Setup

Kind
Flutter widgets
Effort
Medium
Code generation
Yes (build_runner)
Direct dependencies
37

Requires initialisation in main() before runApp and specific platform configurations for Firebase, permissions, and minimum SDK versions (Android minSdk 24, compileSdk 37).

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await StorageService.init();
  await SecureStorageService.init(namespace: 'myapp');
  await HiveStorageService.init();
  runApp(const MyApp());
}

Alternatives

Packages that do the same job and could replace common_utils2.

Works with

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