ilkersevim_type_safe_bloc 0.1.1 copy "ilkersevim_type_safe_bloc: ^0.1.1" to clipboard
ilkersevim_type_safe_bloc: ^0.1.1 copied to clipboard

Type-safe flutter_bloc context extensions and selector, builder, listener, and consumer widgets for compile-time Cubit/BLoC access.

ilkersevim_type_safe_bloc #

Type-safe flutter_bloc helpers: BuildContext extensions and thin widgets around BlocSelector, BlocBuilder, BlocListener, and BlocConsumer.

License: Apache-2.0. Issues: github.com/redjadet/ilkersevim_type_safe_bloc/issues.

Installation #

dependencies:
  ilkersevim_type_safe_bloc: ^0.1.0

Requires Flutter >=3.38.0, Dart >=3.12.0, flutter_bloc ^9.1.1.

Context extensions #

import 'package:ilkersevim_type_safe_bloc/ilkersevim_type_safe_bloc.dart';

final counterCubit = context.cubit<CounterCubit>();
final count = context.watchState<CounterCubit, CounterState>().count;

TypeSafeBlocSelector #

TypeSafeBlocSelector<CounterCubit, CounterState, int>(
  selector: (state) => state.count,
  builder: (context, count) => Text('Count: $count'),
)

API stability #

Public type names and method signatures are a semantic-versioned contract. Breaking changes require a major version bump.

Publishing #

Releases are tagged vX.Y.Z matching pubspec.yaml. Automated publishing uses GitHub Actions OIDC with the protected pub.dev Environment (reviewer: redjadet).

1
likes
0
points
316
downloads

Publisher

unverified uploader

Weekly Downloads

Type-safe flutter_bloc context extensions and selector, builder, listener, and consumer widgets for compile-time Cubit/BLoC access.

Repository (GitHub)
View/report issues

Topics

#bloc #flutter #state-management

License

unknown (license)

Dependencies

flutter, flutter_bloc, provider

More

Packages that depend on ilkersevim_type_safe_bloc