bluetooth_print icon indicating copy to clipboard operation
bluetooth_print copied to clipboard

type '(MethodCall) => Null' is not a subtype of type '((MethodCall) => Future<dynamic>)?' in type cast

Open cristhianveal opened this issue 2 years ago • 4 comments

════════ Exception caught by widgets library ═══════════════════════════════════ The following _CastError was thrown attaching to the render tree: type '(MethodCall) => Null' is not a subtype of type '((MethodCall) => Future)?' in type cast

😢

bluetooth_print: last version flutter version: 2.10.5

cristhianveal avatar May 10 '22 15:05 cristhianveal

any update?

emilmammadov avatar May 18 '22 09:05 emilmammadov

Any updates?

yukitaka13-1110 avatar May 25 '22 07:05 yukitaka13-1110

I solved it with my fork at here: https://github.com/emilmammadov/bluetooth_print You can fork my code but I set the charset to ISO 8859-9 for Turkish characters. So if you will use another charset just change the commit with this SHA 11330f4129e332da772631dc6b62190b152f6955

emilmammadov avatar May 25 '22 08:05 emilmammadov

@thon-ju, can you please add the very simple change from here, essentially just adding the async to your call? https://github.com/emilmammadov/bluetooth_print/commit/68bc24913d0d7c4333dc268e47b8d1e2691da9f4#diff-ae86796ce5471cde755dcbe215a7deb765b7ffdb56671bd2ed4a248f2c7e65d8L23

Guthers avatar Jun 21 '22 23:06 Guthers