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 attributes value is covered to "Optional()" on iOS #25

Merged
merged 1 commit into from
Aug 24, 2021

Conversation

RyoheiTomiyama
Copy link
Contributor

In BonsoirDiscoveryEvent, event.service.attributes value is covered to "Optional"

_bonsoirDiscovery?.eventStream?.listen(_onEventOccurred)

void _onEventOccurred(BonsoirDiscoveryEvent event) async {
    if (event.service == null || !event.isServiceResolved) {
      return;
    }
    print(event.service);

    ....
}

Actual

value in attribute is include "Optional"

flutter:  {"service.name":"iPhone 11 Pro","service.type":"_http._tcp.","service.port":4000,"service.attributes":{"localizedModel":"Optional(\"iPhone\")","model":"Optional(\"iPhone\")"},"service.ip":"127.0.0.1"}

Expected

should not be include "Optional"

flutter: {"service.name":"iPhone 11 Pro","service.type":"_http._tcp.","service.port":4000,"service.attributes":{"localizedModel":"iPhone","model":"iPhone"},"service.ip":"127.0.0.1"}

In BonsoirDiscoveryEvent, `event.service.attributes` value is covered to "Optional"

```dart
_bonsoirDiscovery?.eventStream?.listen(_onEventOccurred)

void _onEventOccurred(BonsoirDiscoveryEvent event) async {
    if (event.service == null || !event.isServiceResolved) {
      return;
    }
    print(event.service);

    ....
}
```

## Actual

```
flutter:  {"service.name":"iPhone 11 Pro","service.type":"_http._tcp.","service.port":4000,"service.attributes":{"localizedModel":"Optional(\"iPhone\")","model":"Optional(\"iPhone\")"},"service.ip":"127.0.0.1"}
```


## Expected

```
flutter: {"service.name":"iPhone 11 Pro","service.type":"_http._tcp.","service.port":4000,"service.attributes":{"localizedModel":"iPhone","model":"iPhone"},"service.ip":"127.0.0.1"}
```
@Skyost
Copy link
Owner

Skyost commented Aug 24, 2021

Thanks a lot !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants