bitchannel 2.0.0
bitchannel: ^2.0.0 copied to clipboard
A mix between an event-oriented package and a communication infrastructure package based on channels and bits of information.
CHANGELOG #
2.0.0 #
Major Changes #
- Revamped Bit and Channel Infrastructure: Complete overhaul of the core
BitandBitChannelarchitecture to improve flexibility and performance. - Improved Type Safety: Enhanced type safety across the package to reduce runtime errors and improve developer experience.
- Asynchronous Handling: Introduced asynchronous handling for all bit transmissions, ensuring better performance and responsiveness.
New Features #
- New Bit Classes: Added
LogBit,RequestBit,ResponseBit,RequestFailed, andResponseOKclasses to cover more use cases out of the box. - Mixin for Core Functionality: Introduced a
Coremixin to provide shared functionality for bits. - Enhanced Logging: Improved logging capabilities, including debug, info, and trace levels, to aid in development and troubleshooting.
- Global Data Handling: Improved mechanism for handling global data that is included with all bits.
- BitService, BitState, and OnBit Mixins: Added mixins for services and widgets that receive bits, simplifying the integration with
BitChannel.
Breaking Changes #
- Channel Joining: The method for joining channels has been updated. Ensure that all instances of
BitChannel.joinare updated to the new format. - Qualifier Changes: The
qualifierproperty has been standardized across all bit types, potentially affecting any custom implementations relying on previous formats. - Data Getter: Custom
datagetters must now explicitly callsuper.dataif they need to include data from the parent class. - Abstract Class Updates:
BitandReceivableBitare now abstract base classes, which may affect existing implementations.
Bug Fixes #
- Handler Call Timing: Fixed an issue where responses could be triggered before the request was fully processed by ensuring handlers are called within a
Future. - Logging Crash Fix: Resolved an issue that caused crashes when using
BitReceiversubclasses with high log levels. - Super Data Inclusion: Ensured that
super.datais included in all overriddendatagetters inResponseBitandRequestFailedclasses.
Miscellaneous #
- Code Clean-up: Refactored various parts of the code for improved readability and maintainability.
- Documentation Updates: Expanded and improved documentation throughout the package to aid developers in understanding and utilizing the new features and changes.
1.0.3 #
Bug Fixes #
- Data Getter Update: Added call to
super.dataindatagetters forResponseBitandRequestFailed. - Handler Call Timing: Added
Future()to handler call in_onBitBuilderto prevent responses from being triggered before the request itself. - Channel Specification Removal: Removed the need to specify
bitChannelinResponseBit.
Miscellaneous #
- Code Refinement: Some code lifting in
helper_bits.dart.
1.0.2 #
Bug Fixes #
- Logging Crash Fix: Fixed an issue that caused the app to crash when using
BitReceiversubclasses (BitService,BitState,OnBit) andBit.logLevelhigher thanLogLevel.info.