Plumix.Bloc 0.1.0-alpha.1

This is a prerelease version of Plumix.Bloc.
dotnet add package Plumix.Bloc --version 0.1.0-alpha.1
                    
NuGet\Install-Package Plumix.Bloc -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.Bloc" 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.Bloc" Version="0.1.0-alpha.1" />
                    
Directory.Packages.props
<PackageReference Include="Plumix.Bloc" />
                    
Project file
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.Bloc --version 0.1.0-alpha.1
                    
#r "nuget: Plumix.Bloc, 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.Bloc@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.Bloc&version=0.1.0-alpha.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Plumix.Bloc&version=0.1.0-alpha.1&prerelease
                    
Install as a Cake Tool

Plumix.Bloc

NuGet

Stream-based state management for Plumix — a port of Flutter's bloc package. Includes widget bindings inspired by flutter_bloc: BlocProvider, BlocBuilder, BlocListener, BlocConsumer, and BlocSelector.

Installation

dotnet add package Plumix.Bloc

Core API

Plumix.Bloc Flutter equivalent Description
Cubit<TState> Cubit<State> Emits new states directly
Bloc<TEvent, TState> Bloc<Event, State> Event-driven state management
Change<TState> Change<State> State change payload
Transition<TEvent, TState> Transition<Event, State> Event-to-state transition payload
EventTransformers bloc_concurrency-style behavior Sequential, Concurrent, Restartable, Droppable
Plumix.Bloc Flutter equivalent Description
BlocProvider<T> BlocProvider<T> Provides a Bloc/Cubit to the widget subtree
RepositoryProvider<T> RepositoryProvider<T> Provides plain repositories/values
BlocBuilder<T, TState> BlocBuilder<T, S> Rebuilds UI on state change
BlocListener<T, TState> BlocListener<T, S> Side-effect listener, does not rebuild
BlocConsumer<T, TState> BlocConsumer<T, S> Combines builder + listener
BlocSelector<T, TState, R> BlocSelector<T, S, R> Rebuilds only when a derived slice changes
MultiBlocProvider MultiBlocProvider Stacks multiple BlocProviders
MultiRepositoryProvider MultiRepositoryProvider Stacks multiple RepositoryProviders

Usage

1. Define a cubit

using Plumix.Bloc;

public sealed class CounterCubit : Cubit<int>
{
    public CounterCubit() : base(0)
    {
    }

    public void Increment() => Emit(State + 1);
}

2. Provide it

new BlocProvider<CounterCubit>(
    bloc: new CounterCubit(),
    child: new AppRoot())

Create-and-own variant (auto-closes on unmount):

new BlocProvider<CounterCubit>(
    create: _ => new CounterCubit(),
    child: new AppRoot())

3. Build UI from state

new BlocBuilder<CounterCubit, int>(
    builder: (context, count) =>
        new Text($"Count: {count}"))

4. Read and update in callbacks

context.Read<CounterCubit>().Increment();

See also

Product 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

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 77 4/27/2026