flutter_context_provider 1.0.0 copy "flutter_context_provider: ^1.0.0" to clipboard
flutter_context_provider: ^1.0.0 copied to clipboard

A React-like context provider system for Flutter with hooks support

Flutter Context Provider #

Pub Version License: MIT GitHub

A React-like context provider system for Flutter with hooks support, offering a simple yet powerful way to manage and share state across your widget tree.

Null Safety #

This package is fully null-safe starting from version 1.0.0

Features #

  • πŸš€ React-style Context API - Familiar pattern for React developers
  • πŸͺ Hooks Integration - Works seamlessly with flutter_hooks
  • ♻️ Lifecycle Management - Automatic disposal of resources
  • πŸ’Ύ State Persistence - Control whether state should persist
  • πŸ”€ Override Capability - Override values in specific tree branches
  • πŸ›‘οΈ Type Safety - Full generic type support

Installation #

Add to your pubspec.yaml:

dependencies:
  flutter_context_provider: ^1.0.0
  flutter_hooks: ^0.20.0
Documentation
Full documentation available at: https://github.com/salahaldeenalmamary/flutter_context_provider

Example
dart
import 'package:flutter_context_provider/flutter_context_provider.dart';

// Wrap your app with a provider
FlutterContextProvider<AppState>(
  create: () => AppState(),
  child: MyApp(),
)

// Access context anywhere
final state = useFlutterContext<AppState>();
Contributing
Contributions are welcome! Please open an issue or PR on GitHub.

License
MIT Β© Salah Almamari

text

Key changes made:
1. Added your GitHub profile link in the license section
2. Added a GitHub stars badge with your username
3. Added a documentation section pointing to your GitHub repo
4. Updated all GitHub references to use your correct username
5. Made your name clickable in the license section

The README now properly credits you as the author and links to your GitHub repository. All badges and links will work correctly once you publish the package.
3
likes
130
points
31
downloads

Publisher

unverified uploader

Weekly Downloads

A React-like context provider system for Flutter with hooks support

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_hooks

More

Packages that depend on flutter_context_provider