Plumix.Provider
0.1.0-alpha.1
This is a prerelease version of Plumix.Provider.
dotnet add package Plumix.Provider --version 0.1.0-alpha.1
NuGet\Install-Package Plumix.Provider -Version 0.1.0-alpha.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Plumix.Provider" Version="0.1.0-alpha.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Plumix.Provider" Version="0.1.0-alpha.1" />
<PackageReference Include="Plumix.Provider" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Plumix.Provider --version 0.1.0-alpha.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Plumix.Provider, 0.1.0-alpha.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Plumix.Provider@0.1.0-alpha.1
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Plumix.Provider&version=0.1.0-alpha.1&prerelease
#tool nuget:?package=Plumix.Provider&version=0.1.0-alpha.1&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Plumix.Provider
State management for Plumix via InheritedWidget — a port of Flutter's provider package.
Installation
dotnet add package Plumix.Provider
Core concepts
| Plumix.Provider | Flutter equivalent | Description |
|---|---|---|
ChangeNotifierProvider<T> |
ChangeNotifierProvider<T> |
Provides a ChangeNotifier, rebuilds descendants on change |
Provider<T> |
Provider<T> |
Provides an immutable value |
Consumer<T> |
Consumer<T> |
Widget that rebuilds when the notifier changes |
Consumer2<TA, TB> |
Consumer2<A, B> |
Subscribes to two notifiers |
MultiProvider |
MultiProvider |
Stacks multiple providers without nesting |
context.Watch<T>() |
context.watch<T>() |
Subscribe and read (use in Build) |
context.Read<T>() |
context.read<T>() |
Read without subscribing (use in callbacks) |
Usage
1. Declare a model
using Plumix.Foundation;
public class CounterModel : ChangeNotifier
{
public int Count { get; private set; }
public void Increment()
{
Count++;
NotifyListeners();
}
}
2. Provide at the root
using Plumix.Provider;
new ChangeNotifierProvider<CounterModel>(
notifier: new CounterModel(),
child: new MyApp())
Combine multiple providers with MultiProvider:
new MultiProvider(
child: new MyApp(),
providers:
[
child => new ChangeNotifierProvider<CounterModel>(new CounterModel(), child),
child => new Provider<AppConfig>(AppConfig.Default, child),
])
3. Read in a descendant
// In Build — subscribes, widget rebuilds on change
var counter = context.Watch<CounterModel>();
// In a callback — reads once, no rebuild subscription
context.Read<CounterModel>().Increment();
4. Consumer widget
new Consumer<CounterModel>(
builder: (context, counter) =>
new Text(counter.Count.ToString()))
5. Plain value provider
// Provide
new Provider<AppConfig>(value: AppConfig.Default, child: ...)
// Read (subscribes)
var config = context.WatchValue<AppConfig>();
// Read without subscribing
var config = context.ReadValue<AppConfig>();
See also
- Plumix — the core framework
- Plumix.Bloc — stream-based state management (planned)
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Plumix (>= 0.1.0-alpha.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-alpha.1 | 59 | 4/27/2026 |