google / flutter-desktop-embedding

Experimental plugins for Flutter for Desktop
Apache License 2.0
7.11k stars 608 forks source link

[url_launcher_fde] return true on success on Windows #776

Closed hpoul closed 4 years ago

hpoul commented 4 years ago

I stumbled on an exception because the url_launcher plugin is expected to return a boolean value on success. Previously the windows plugin only returned success without any value.

Otherwise an exception is thrown when await'ed ``` [+9232 ms] [ERROR:flutter/lib/ui/ui_dart_state.cc(166)] Unhandled Exception: Failed assertion: boolean expression must not be null [ ] #0 URLLauncherTestWidget.build. (package:testbed/main.dart:370:20) [ ] [ ] #1 URLLauncherTestWidget.build. (package:testbed/main.dart) [ ] #2 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:992:19) [ ] #3 _InkResponseState.build. (package:flutter/src/material/ink_well.dart:1101:38) [ ] #4 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:184:24) [ ] #5 TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:524:11) [ ] #6 BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:284:5) [ ] #7 BaseTapGestureRecognizer.handlePrimaryPointer (package:flutter/src/gestures/tap.dart:219:7) [ ] #8 PrimaryPointerGestureRecognizer.handleEvent (package:flutter/src/gestures/recognizer.dart:477:9) [ ] #9 PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:78:12) [ ] #10 PointerRouter._dispatchEventToRoutes. (package:flutter/src/gestures/pointer_router.dart:124:9) [ ] #11 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:377:8) [ ] #12 PointerRouter._dispatchEventToRoutes (package:flutter/src/gestures/pointer_router.dart:122:18) [ ] #13 PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:108:7) [ ] #14 GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:220:19) [ ] #15 GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:200:22) [ ] #16 GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:158:7) [ ] #17 GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:104:7) [ ] #18 GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:88:7) [ ] #19 _rootRunUnary (dart:async/zone.dart:1206:13) [ ] #20 _CustomZone.runUnary (dart:async/zone.dart:1100:19) [ ] #21 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1005:7) [ ] #22 _invoke1 (dart:ui/hooks.dart:267:10) [ ] #23 _dispatchPointerDataPacket (dart:ui/hooks.dart:176:5) ```