MDNS support in Flutter

1,555

There is an issue reported which say the package is not compatible, what you can do is :

~ Fork the project :

https://github.com/platinumjam/flutter_mdns

~ Modify the pubspec.yaml file and add these constraints :

environment:
  sdk: ">=2.0.0-dev.68.0 <3.0.0"

~ Push and send PR to the original project, meanwhile you can point directly to your repo.

Instead of this :

dependencies:
  mdns: ^0.0.1

Use this:

dependencies:
   mdns: 
     git: https://github.com/yourUser/flutter_mdns.git
Share:
1,555
Learner
Author by

Learner

Be who you wanna be...

Updated on December 08, 2022

Comments

  • Learner
    Learner over 1 year

    We need to connect Rasberry PI device locally using domain name. For that we have already enables mDNS support in Rasberry PI device. When we looking for mDNS from flutter mDNS flutter. But that is not compatible with latest Dart versions and it has unimplemented features.

    Our use case is need to connect PI3 device using hostname locally.

    Could someone help on this? any alternative approaches are there?

  • Learner
    Learner over 5 years
    Thanks @diegoveloper... It worked for me after some tweaks from the older plugin... Tested in Android and have to test it in iOS as well...