Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use type-specific methods in public clients, Value in internal clients #90

Merged
merged 10 commits into from
Jan 12, 2024
4 changes: 2 additions & 2 deletions example/flutter_chat_app/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ class _MyHomePageState extends State<MyHomePage> {
}

Future<void> publishMessage() async {
final result = await _topicClient.publish(
"cache", "topic", StringValue(_textInputController.text));
final result =
await _topicClient.publish("cache", "topic", _textInputController.text);
switch (result) {
case TopicPublishSuccess():
print("Successful publish");
Expand Down
4 changes: 2 additions & 2 deletions example/quickstart/quickstart.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Future<void> main() async {
Duration(seconds: 30));

final cacheName = "cache";
final key = StringValue("key");
final value = StringValue("value");
final key = "key";
final value = "value";

final setResp = await cacheClient.set(cacheName, key, value);
switch (setResp) {
Expand Down
3 changes: 1 addition & 2 deletions example/topics/advanced.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ void main() async {
Timer(const Duration(seconds: 2), () async {
// publish 10 messages spaced 1 second apart
for (final i in Iterable.generate(10)) {
var result =
await topicClient.publish("cache", "topic", StringValue("hi $i"));
var result = await topicClient.publish("cache", "topic", "hi $i");
switch (result) {
case TopicPublishSuccess():
print("Successful publish!");
Expand Down
3 changes: 1 addition & 2 deletions example/topics/basic_publisher.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ void main() async {

// publish 10 messages spaced 1 second apart
for (final i in Iterable.generate(10)) {
var result =
await topicClient.publish("cache", "topic", StringValue("hi $i"));
var result = await topicClient.publish("cache", "topic", "hi $i");
switch (result) {
case TopicPublishSuccess():
print("Successful publish!");
Expand Down
Loading
Loading