Skip to main content

flutter_omni_kit 1.1.0 copy "flutter_omni_kit: ^1.1.0" to clipboard
flutter_omni_kit: ^1.1.0 copied to clipboard

A comprehensive, production-grade collection of Flutter media widgets, document previewers, and Dart extension methods designed specifically for real-world app development.

Flutter Omni Kit 🚀 #

Pub Version Flutter Platform License: MIT

A comprehensive, production-grade Flutter toolkit. flutter_omni_kit provides ready-to-use media players, document previewers, modern UI components (like dialogs, toasts, and glassmorphism), robust network utilities, and over 100+ Dart extensions to drastically speed up your development process.

Stop reinventing the wheel for every project. Drop in flutter_omni_kit and start building.


📑 Table of Contents #


💻 Installation #

Add flutter_omni_kit to your pubspec.yaml:

dependencies:
  flutter_omni_kit: ^1.0.7

Run flutter pub get to install.


💎 Modern UI Components #

🔔 OmniToast (Dependency-Free Toasts) #

A beautiful, highly customizable toast notification system that injects directly into the Overlay. It supports dynamic updating (e.g., from loading to success).

import 'package:flutter_omni_kit/flutter_omni_kit.dart';

// Basic Toast
OmniToast.success(context, message: 'Profile updated successfully!');
OmniToast.error(context, message: 'Failed to connect to the server.');

// Async Dynamic Toasts (Loading -> Success/Error)
final toast = OmniToast.loading(context, message: 'Uploading file...');
try {
  await uploadFile();
  toast.success('Upload complete!'); // Automatically changes icon and auto-dismisses
} catch (e) {
  toast.error('Upload failed. Try again.');
}

💬 OmniDialog (Async Dialogs) #

A production-ready dialog API that handles asynchronous actions cleanly.

// The dialog handles the Future automatically, showing a loading spinner
// inside the confirm button and blocking duplicate taps!
final confirmed = await OmniDialog.confirm(
  context,
  title: 'Delete Account?',
  message: 'This action cannot be undone. Are you sure?',
  confirmText: 'Delete',
  onConfirm: () async {
    await api.deleteUserAccount(); 
  },
);

🧊 OmniGlassCard (Glassmorphism) #

Create stunning frosted-glass containers in one line of code.

OmniGlassCard(
  blur: 15.0,
  opacity: 0.2,
  padding: const EdgeInsets.all(16),
  borderRadius: BorderRadius.circular(24),
  child: const Text(
    "Premium Glass Effect",
    style: TextStyle(color: Colors.white, fontSize: 18),
  ),
)

✨ OmniShimmer (Skeleton Loaders) #

High-performance shimmer effect for loading states.

OmniShimmer(
  child: Container(
    height: 100,
    width: double.infinity,
    decoration: BoxDecoration(
      color: Colors.white,
      borderRadius: BorderRadius.circular(12),
    ),
  ),
)

🎬 Media & Documents #

🎥 OmniVideoPlayer #

A drop-in, robust video player that automatically handles initialization, controls, and aspect ratios.

OmniVideoPlayer(
  url: 'https://www.example.com/video.mp4',
  autoPlay: true,
  loop: true,
  showControls: true,
)

🎵 OmniAudioPlayer #

Unified audio player with a clean, built-in UI for scrubbing and playback.

OmniAudioPlayer(
  url: 'https://www.example.com/audio.mp3',
)

📄 OmniFilePreviewer #

Universal previewer capable of rendering PDFs, network images, and local files cleanly.

OmniFilePreviewer(
  filePath: 'https://www.example.com/document.pdf',
  // Automatically detects if it's an image or PDF
)

⚡ Infrastructure #

🌐 OmniNetwork #

A simplified, robust HTTP API client built on top of dio, with integrated connectivity checking, automatic interceptors, and typed responses.

// 1. Initialize once
final api = OmniNetwork();
api.init(
  baseUrl: 'https://api.example.com/v1',
  headers: {'Authorization': 'Bearer <token>'},
);

// 2. Perform safe calls
try {
  final response = await api.get('/users/profile');
  print(response.data);
} catch (e) {
  print('Network error: $e');
}

💾 OmniStorage #

Effortless, type-safe local key-value persistence.

// 1. Initialize early in your app lifecycle
await OmniStorage.init();

// 2. Write and Read seamlessly
OmniStorage.write('isLoggedIn', true);
OmniStorage.write('userName', 'John Doe');

final isLoggedIn = OmniStorage.read<bool>('isLoggedIn') ?? false;

🛠️ Core Extensions #

flutter_omni_kit provides over 100+ combined utility extensions to make Dart feel like magic.

Here are a few examples:

String Extensions #

"hello_world".toCamelCase();     // "helloWorld"
"john doe".capitalize();         // "John Doe"
"test@email.com".isValidEmail(); // true
"123".toIntOrNull();             // 123

DateTime Extensions #

DateTime.now().isToday;          // true
DateTime.now().addDays(5);       // DateTime 5 days from now
DateTime.now().toFormattedDateString(); // "Sep 5, 2026"

List Extensions #

final list = [1, 2, 3, 4, 5];
list.chunked(2);                 // [[1, 2], [3, 4], [5]]
list.getOrNull(10);              // null (instead of RangeError)

Num Extensions #

1500.toCompact();                // "1.5K"
50.clampMin(100);                // 100

📝 License #

This package is licensed under the MIT License.

(Refer to DOCUMENTATION.md for exhaustive API details if needed).

6
likes
140
points
289
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A comprehensive, production-grade collection of Flutter media widgets, document previewers, and Dart extension methods designed specifically for real-world app development.

Homepage
Repository (GitHub)
View/report issues

Topics

#ui #media #extensions #pdf #utility

License

MIT (license)

Dependencies

cached_network_image, chewie, connectivity_plus, dio, flutter, just_audio, open_filex, rxdart, shared_preferences, shimmer, syncfusion_flutter_pdfviewer, video_player

More

Packages that depend on flutter_omni_kit