- Copy Dart SDK (
${FLUTTER_DIR}/bin/cache/dart-sdk/include
) to your project, e.g.ios/Classes/
- Add your own code like the following fragment
#include "dart_api_dl.h"
// Receives NativePort ID from Flutter code
static Dart_Port_DL dart_port = 0;
const std = @import("std"); | |
const Allocator = std.mem.Allocator; | |
pub const Error = error{ | |
EndOfStream, | |
Utf8InvalidStartByte, | |
} || std.fs.File.ReadError || std.fs.File.SeekError || std.mem.Allocator.Error; | |
pub fn Parser(comptime Value: type, comptime Reader: type) type { | |
return struct { |