- 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 { |
❗❗❗ОБНОВЛЕННАЯ ВЕРСИЯ СТАТЬИ НАХОДИТСЯ ТУТ ❗❗❗
mapEventToState
,// MIT License | |
// | |
// Copyright (c) 2021 Simon Lightfoot | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is | |
// furnished to do so, subject to the following conditions: |
#include <assert.h> | |
#include <chrono> | |
#include <embedder.h> | |
#include <glfw3.h> | |
#include <iostream> | |
static_assert(FLUTTER_ENGINE_VERSION == 1, ""); | |
static const size_t kInitialWindowWidth = 800; |
const std = @import("std"); | |
const Allocator = std.mem.Allocator; | |
const Parser = @import("parser.zig").Parser; | |
const Error = @import("parser.zig").Error; | |
pub fn Literal(comptime Reader: type) type { | |
return struct { | |
parser: Parser([]u8, Reader) = .{ | |
._parse = parse, | |
}, |
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file | |
// for details. All rights reserved. Use of this source code is governed by a | |
// BSD-style license that can be found in the LICENSE file. | |
import 'package:analyzer/dart/ast/ast.dart'; | |
import 'package:scrape/scrape.dart'; | |
void main(List<String> arguments) { | |
Scrape() | |
..addHistogram('Signatures') | |
..addHistogram('Parameters') |
import 'dart:async'; | |
import 'dart:ffi' show Uint8, Uint8Pointer; | |
import 'package:ffi/ffi.dart' show calloc; // , malloc | |
import 'package:win32/win32.dart' | |
show GetKeyboardState, GetKeyState; // , GetAsyncKeyState; | |
import 'virtual_key_codes.dart'; | |
/// Key - Virtual Key codes |
import 'dart:async'; | |
import 'package:bloc/bloc.dart'; | |
import 'package:bloc_concurrency/bloc_concurrency.dart'; | |
import 'package:freezed_annotation/freezed_annotation.dart'; | |
part 'timer_bloc.freezed.dart'; | |
@freezed | |
class TimerEvent with _$TimerEvent { |