Issue I want to use the MAVLink C library to parse MAVLink packets in dart, but the Dart FFI generated mavlink_message_t is an opaque class, while other structs like mavlink_system_t are generated normally with all their attributes. What is the
Continue readingTag: dart-ffi
What is 'Native Type' for 'char*' in dart FFI?
Issue I have a function like this in C: char* getString() { return "SOME_STRING"; } now I want to invoke it by FFI in dart, and this is my code: import ‘dart:io’; import ‘dart:ffi’; void main(List<String> arguments) { print(‘${getString()}’); }
Continue readingHow to acess the result from a function pointer in dart
Issue I am trying to get the return value from c++ function in dart. My c++ code is something like this static bool is_alive() { return true; } From dart, I loaded the shared lib with this native code and
Continue readingHow to pass a list of strings to C In dart ffi
Issue I’m learning how to use dart ffi. I don’t have much C experience or knowledge. I’m trying to call a function from a C library(tiny file dialogs). I can call other functions however I can’t call this one char
Continue readingFlutter C++ Memory allocation causes jank on raster thread – Android NDK Dart FFI
Issue I have a flutter app which uses Dart ffi to connect to my custom C++ audio backend. There I allocate around 10MB of total memory for my audio buffers. Each buffer has 10MB / 84 of memory. I use
Continue readingtype safe memory allocation with dart ffi
Issue I’m trying to make my code a little more robust when allocating memory for ffi. I’ve written the following function: void withMemory<T extends NativeType>( int size, void Function(Pointer<T> memory) action) { final memory = calloc<Int8>(size); try { action(memory.cast()); }
Continue readingCould not find a package configuration file provided by "openssl"
Issue I’m trying to use OpenSSL with Flutter using dart:ffi, but when i run the project on Ubuntu 20.04 the error message as below comes out. I tested the project on Windows 10 and it worked. Project repository CMakeLists.txt cmake_minimum_required(VERSION
Continue readingDart/Flutter ffi (Foreign Function Interface) native callbacks eg: sqlite3_exec
Issue Hello I am using dart:ffi to build an interface with my native c/c++ library. and I needed a way to get a callback from c to dart as an example in sqlite: int sqlite3_exec( sqlite3*, /* An open database
Continue readingUndefined reference while compiling Flutter app on Linux
Issue I built a plugin which uses Dart FFI and a shared lib and published to pub.dev. Whenever I try using the plugin in my app, it always fails with a file not found error and I don’t know where
Continue readingDart ffi – Call Dart From C++
Issue I am making a flutter application where I have my backend as C++. Through dart ffi I am signalling a load call when user enters a certain screen. My problem is Im loading audio in C++ but I want
Continue reading