- 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;| // Simple example of client. | |
| // Client prints received messages to stdout and sends from stdin. | |
| #include <errno.h> | |
| #include <fcntl.h> | |
| #include <stdio.h> | |
| #include <signal.h> | |
| #include <unistd.h> | |
| #include <sys/select.h> | |
| #include <netinet/in.h> |
| //DNS Query Program on Linux | |
| //Author : Silver Moon (m00n.silv3r@gmail.com) | |
| //Dated : 29/4/2009 | |
| //Header Files | |
| #include<stdio.h> //printf | |
| #include<string.h> //strlen | |
| #include<stdlib.h> //malloc | |
| #include<sys/socket.h> //you know what this is for | |
| #include<arpa/inet.h> //inet_addr , inet_ntoa , ntohs etc |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| #include <fcntl.h> | |
| #include <netinet/tcp.h> | |
| #include <sys/socket.h> | |
| #include <sys/types.h> | |
| #include <netinet/in.h> |
| #!/bin/sh | |
| install_v2ray(){ | |
| echo "Install v2ray..." | |
| if [[ ! -f /usr/bin/v2ray/v2ray ]] | |
| then | |
| curl -Ls https://install.direct/go.sh | bash | |
| fi | |
| mkdir -p /etc/v2ray |