From cccca767b9698021f41a9bdbac9732ef7f92ed69 Mon Sep 17 00:00:00 2001 From: Jan Romann Date: Fri, 12 Jan 2024 23:36:53 +0100 Subject: [PATCH] chore(examples): add event subscribing to the main example --- README.md | 3 +++ example/example.dart | 3 +++ 2 files changed, 6 insertions(+) diff --git a/README.md b/README.md index 2066c035..087019b0 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,9 @@ Future main(List args) async { '"${thingDescription.title}"!', ); + print(consumedThing.thingDescription.events); + await consumedThing.subscribeEvent("change", print); + print("Incrementing counter ..."); await consumedThing.invokeAction("increment"); diff --git a/example/example.dart b/example/example.dart index ededc6cc..23dc2adb 100644 --- a/example/example.dart +++ b/example/example.dart @@ -29,6 +29,9 @@ Future main(List args) async { '"${thingDescription.title}"!', ); + print(consumedThing.thingDescription.events); + await consumedThing.subscribeEvent("change", print); + print("Incrementing counter ..."); await consumedThing.invokeAction("increment");