[MDNS] Null safe and Android V2#58
Open
atrope wants to merge 4 commits into
Open
Conversation
rvbiljouw
added a commit
to mertonlabs/flutter-mdns
that referenced
this pull request
Jun 24, 2021
|
Fix for #60 |
|
Can you please fix the example app as well to support Android V2?. This app is using a deprecated version of the Android embedding.
To avoid unexpected runtime failures, or future build failures, try to migrate this app to the V2 embedding.
Take a look at the docs for migrating an app: https://github.com/flutter/flutter/wiki/Upgrading-pre-1.12-Android-projects
The plugin `mdns_plugin` requires your app to be migrated to the Android embedding v2. Follow the steps on https://flutter.dev/go/android-project-migration and re-run this command.Plus I get null safety errors when using in new flutter app E/flutter ( 8286): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: Null check operator used on a null value
E/flutter ( 8286): #0 EventChannel.binaryMessenger (package:flutter/src/services/platform_channel.dart:473:86)
E/flutter ( 8286): #1 EventChannel.receiveBroadcastStream.<anonymous closure> (package:flutter/src/services/platform_channel.dart:493:7)
E/flutter ( 8286): #2 EventChannel.receiveBroadcastStream.<anonymous closure> (package:flutter/src/services/platform_channel.dart:492:64)
E/flutter ( 8286): #3 _runGuarded (dart:async/stream_controller.dart:773:24)
E/flutter ( 8286): #4 _BroadcastStreamController._subscribe (dart:async/broadcast_stream_controller.dart:207:7)
E/flutter ( 8286): #5 _ControllerStream._createSubscription (dart:async/stream_controller.dart:786:19)
E/flutter ( 8286): #6 _StreamImpl.listen (dart:async/stream_impl.dart:473:9)
E/flutter ( 8286): #7 new MDNSPlugin (package:mdns_plugin/mdns_plugin.dart:115:44)
E/flutter ( 8286): #8 main (package:app_flutter_test/main.dart:6:25)
E/flutter ( 8286): #9 _runMainZoned.<anonymous closure>.<anonymous closure> (dart:ui/hooks.dart:129:25)
E/flutter ( 8286): #10 _rootRun (dart:async/zone.dart:1428:13)
E/flutter ( 8286): #11 _CustomZone.run (dart:async/zone.dart:1328:19)
E/flutter ( 8286): #12 _runZoned (dart:async/zone.dart:1863:10)
E/flutter ( 8286): #13 runZonedGuarded (dart:async/zone.dart:1851:12)
E/flutter ( 8286): #14 _runMainZoned.<anonymous closure> (dart:ui/hooks.dart:125:5)
E/flutter ( 8286): #15 _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:297:19)
E/flutter ( 8286): #16 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192:12)
E/flutter ( 8286):
E/flutter ( 8286): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: Null check operator used on a null value
E/flutter ( 8286): #0 MethodChannel.binaryMessenger (package:flutter/src/services/platform_channel.dart:132:86)
E/flutter ( 8286): #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:157:36)
E/flutter ( 8286): #2 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:340:12)
E/flutter ( 8286): #3 MDNSPlugin.startDiscovery (package:mdns_plugin/mdns_plugin.dart:157:33)
E/flutter ( 8286): #4 main (package:app_flutter_test/main.dart:7:14)
E/flutter ( 8286): #5 _runMainZoned.<anonymous closure>.<anonymous closure> (dart:ui/hooks.dart:129:25)
E/flutter ( 8286): #6 _rootRun (dart:async/zone.dart:1428:13)
E/flutter ( 8286): #7 _CustomZone.run (dart:async/zone.dart:1328:19)
E/flutter ( 8286): #8 _runZoned (dart:async/zone.dart:1863:10)
E/flutter ( 8286): #9 runZonedGuarded (dart:async/zone.dart:1851:12)
E/flutter ( 8286): #10 _runMainZoned.<anonymous closure> (dart:ui/hooks.dart:125:5)
E/flutter ( 8286): #11 _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:297:19)
E/flutter ( 8286): #12 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192:12)
E/flutter ( 8286): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Making the MDNS Plugin null safe(#57) and upgrade to V2 Embedding