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

A package to generate helper extensions for Bloc, Cubit, and custom state management. It provides a configurable class, `BlocStateGen`, with options to generate the `match` and `matchSome` methods, al [...]

1.0.0 #

  • feat!: move annotation target from state to bloc/cubit class
  • feat: support state classes defined inside bloc/cubit, HydratedCubit/Bloc, ReplayCubit/Bloc classes
  • fix: update deprecated analyzer API usage (enclosingElement3)
  • fix: improve nested class detection
  • fix: enhance error handling for missing state classes
  • docs: update README with new inline state definition examples
  • docs: add migration guide for 1.0.0
  • chore: update minimum Dart SDK version to 2.17.0
  • chore: upgrade analyzer dependency

0.1.1+3 #

  • Documentation Updates:
    • Fixed dead example link in the README.md.
    • Removed the contribution guide section from the README.md.
    • Added a video example to the README.md for better understanding.

0.1.0+2 #

  • Update _getParameterName function:
    • Converts a class name to a parameter name in camelCase.
    • Cleans class names by removing common suffixes like State, Bloc, and Cubit.
    • Handles standardized names for common state types (e.g., Loading becomes onLoading).
    • Removes the parent class name prefix for custom states and converts them to camelCase. Examples:
    • LoadingStateonLoading
    • AuthenticatedUserStateonAuthenticated
    • SuccessBloconSuccess
    • CustomErroronCustomError

0.0.1 #

  • Initial release
  • Support for generating state extensions
  • Match pattern support
  • Logging utilities
3
likes
50
points
31
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A package to generate helper extensions for Bloc, Cubit, and custom state management. It provides a configurable class, `BlocStateGen`, with options to generate the `match` and `matchSome` methods, along with a `log` method, based on the specified flags.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

analyzer, build, flutter, meta, source_gen

More

Packages that depend on bloc_state_gen