Closed casterock closed 2 years ago
I see you're testing on Windows. Is it so? We had an issue with TXT field on Windows which was fixed, but wasn't released until now. Could you please try with latest version 1.3.3 and see if it fixes your issue?
Thanks, updated and now is working but seams that Strings are converted to Char, take a look i'm using this line to show text: title: Text( (services[index].name.toString() +services[index].txt.toString() +services[index].hostname.toString() ) ?? 'Invalid service name'),
Thanks and best regards
Can you try with other platforms? I'd like to know if it's specific to Windows.
Same in Android. Thanks for the support
OK, now I know what happened. This is intended behavior. If you check txt
's type definition, you'll see it is: final Map<String, Uint8List>? txt;
. It is implemented this way because TXT record can also be non-String value. If for example in your case it is a UTF8 encoded string, you should decode it like utf8.decode(serviceInfo.txt!['foo']!)
. utf
is provided by Dart's convert
library.
I'm working with flutter_nsd example and an ESP8266. If I configure my ESP without service txt the example discovers him, but when I add a service txt the example couldn't discover him. My router has service txt too and can't be discovered by the example. I think is a Stream declaration problem
My ESP hostname is "lucho", here a print of the stream: I added a service txt called "endpoint" "/stream"
Pay atention to line: 192.168.0.57:5353 : additional lucho._http._tcp.local. TXT endpoint = /stream last record in this packet
I can see the broadcast but service not added
Thanks