advanced_change_notifier 1.0.1 copy "advanced_change_notifier: ^1.0.1" to clipboard
advanced_change_notifier: ^1.0.1 copied to clipboard

A ChangeNotfier alternative used to avoid redundant code .

example/advanced_change_notifier_example.dart

import 'package:advanced_change_notifier/advanced_change_notifier.dart';

class ChatService extends AdvancedChangeNotifier<String> {
  sendMessage(String text) {
    print("He said: '$text'");
    notifyListeners(value: text);
  }
}

void main() {
  var service = ChatService();
  service.addListener(
    (value) async {
      print("This listener was called and received '$value'");
    },
  );
  service.sendMessage("A test of this package");
}
1
likes
130
points
25
downloads

Publisher

unverified uploader

Weekly Downloads

A ChangeNotfier alternative used to avoid redundant code .

Documentation

API reference

License

MIT (license)

More

Packages that depend on advanced_change_notifier