google / flutter-mediapipe

Apache License 2.0
161 stars 7 forks source link

Native Memory Helpers, take 2 #19

Closed craiglabenz closed 1 month ago

craiglabenz commented 4 months ago

Adds helpers for converting between Dart and native memory for the following scenarios:

Some of this functionality already existed, and some of it is new to this PR. Where the functionality already existed, the implementations were consolidated on extension methods instead of free-floating functions. Also, methods to convert from native memory to Dart types now return nullable types instead of throwing exceptions on null pointers.

Replaces #18

cc @Piinks

craiglabenz commented 4 months ago

CI is failing because this refactors code that was in use elsewhere, but I want to make sure the utilities are correct before propagating their changes everywhere. However, those updates are quite trivial.

craiglabenz commented 1 month ago

Obsolete.