Skip to content

Commit

Permalink
chore: update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
glemartret committed Nov 5, 2024
1 parent 2750a88 commit ae1c0c1
Show file tree
Hide file tree
Showing 8 changed files with 536 additions and 130 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

All notable changes to the `lm_labs_utils` package will be documented in this file.

## [1.1.1] - Date of Release
## [1.1.2] - 5/11/2024
- Update dependencies

## [1.1.1]
- Migrate to public packages

## [1.1.0] - Initial Release
Expand Down
32 changes: 32 additions & 0 deletions lib/src/utils/bubbling_event/bubbling_event.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// import 'package:pos/src/utils/bubbling_event/bubbling_state.dart';
// import 'package:riverpod_annotation/riverpod_annotation.dart';

// part 'bubbling_event.g.dart';

// TODO: Wait for riverpod v3 to be released for generic types support
// @riverpod
// class BubblingStream<T> extends _$BubblingStream {
// void addListener(BubblingListener<T> listener) {
// final listeners = state.listeners;
// listeners.add(listener);
// state = state.copyWith(listeners: listeners);
// }

// @override
// BubblingState<T> build(Stream<T> stream) =>
// BubblingState<T>(stream: stream..listen(_internalListener));

// void removeListener(BubblingListener<T> listener) {
// final listeners = state.listeners;
// listeners.remove(listener);
// state = state.copyWith(listeners: listeners);
// }

// void _internalListener(T value) {
// for (final listener in state.listeners) {
// if (listener(value)) {
// break;
// }
// }
// }
// }
176 changes: 176 additions & 0 deletions lib/src/utils/bubbling_event/bubbling_event.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions lib/src/utils/bubbling_event/bubbling_state.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// import 'package:freezed_annotation/freezed_annotation.dart';

// part 'bubbling_state.freezed.dart';

// typedef BubblingListener<T> = bool Function(T value);

// @freezed
// sealed class BubblingState<T> {
// const factory BubblingState({
// required Stream<T> stream,
// @Default([]) List<BubblingListener<T>> listeners,
// }) = _BubblingState;
// }
Loading

0 comments on commit ae1c0c1

Please sign in to comment.