An open API service indexing awesome lists of open source software.

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.

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]'
```