stringToNativeVoid function
Implementation
Pointer<Void> stringToNativeVoid(String str, {Allocator allocator = calloc}) {
final units = utf8.encode(str);
final result = allocator<Uint8>(units.length + 1);
final nativeString = result.asTypedList(units.length + 1);
nativeString.setAll(0, units);
nativeString[units.length] = 0;
return result.cast();
}