samples
samples copied to clipboard
A collection of Dart code samples by Dart DevRel
When you try to run you get an error asking you to add a "program" field to the run spec. The GitHub sample doesn't produce any results for no apparent...
Windows does not use m.lib as its math library is included in the standard library. The `CMakeLists.txt` should read: ``` cmake_minimum_required(VERSION 3.7 FATAL_ERROR) project(structs_library VERSION 1.0.0 LANGUAGES C) add_library(structs_library SHARED...
This line reads: https://github.com/dart-lang/samples/blob/main/ffi/primitives/primitives.dart#L46C1-L46C81 ``` Directory.current.path, 'primitives_library', 'Debug', 'primtives.dll'); ``` That `'primtives.dll'` should be `'primitives.dll'`, it's missing the second `i`
Hi, I try to run the example as is and after running cmake command running the command make and getting error: make: *** No targets specified and no makefile found
The sample .dart files reference "xyz_library/Debug/[sample name].dll", whereas the created files are "xyz_library/lib[sample_name].dll".
We should test free_pointer function too. - Thanks for your contribution! Please replace this text with a description of what this PR is changing or adding and why, list any...
A few tweaks needed -- library produced on windows is primitives.dll so we need library name "primitives" we need to add free_pointer to the exports so we can access that...
I have this example from @lrhn that could be used to update [`long_running_isolate.dart`](https://github.com/dart-lang/samples/blob/master/isolates/bin/long_running_isolate.dart) In Lasse's words: This is a fairly primitive version of remote-running a stream function, it doesn't forward...
Add ffi sample code and instructions for an iOS app. See https://github.com/flutter/flutter/issues/116950#issuecomment-1371433185 for confusion for how to practically implement this. cc @dcharkes
Please ignore my ignorance but while I'm trying to learn more about `ffi` I studied the structs sample. I just don't understand how freeing `myHomeUtf8` does not leave a dangling...