https://github.com/hacker1024/notifying_list.dart
A Dart package providing list implementations that notify when they're modified.
https://github.com/hacker1024/notifying_list.dart
dart dart-library dart-package dart-streams dartlang reactive streams
Last synced: 12 months ago
JSON representation
A Dart package providing list implementations that notify when they're modified.
- Host: GitHub
- URL: https://github.com/hacker1024/notifying_list.dart
- Owner: hacker1024
- License: mit
- Created: 2022-06-03T14:09:53.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2023-04-23T16:26:46.000Z (about 3 years ago)
- Last Synced: 2025-07-09T04:04:53.976Z (12 months ago)
- Topics: dart, dart-library, dart-package, dart-streams, dartlang, reactive, streams
- Language: Dart
- Homepage: https://pub.dev/packages/notifying_list
- Size: 8.79 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# notifying_list
A Dart package providing list implementations that notify when they're modified.
## Features
- A callback-based notifying list (`CallbackNotifyingList`)
- A stream-based notifying list (`StreamNotifyingList`)
## Getting started
Import the library:
```dart
import 'package:notifying_list/notifying_list.dart';
```
## Usage
```dart
final callbackList = CallbackNotifyingList(() => print('Modified!'));
callbackList.add(0); // 'Modified!'
final streamList = StreamNotifyingList()
..stream.forEach(
(currentList) => print('Modified! Current list: $currentList'),
);
streamList.add(0); // 'Modified! Current list: [0]'
```