Giter Site home page Giter Site logo

zontag / flutter_ffi_demo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from doo/flutter_ffi_demo

0.0 0.0 0.0 33.35 MB

a demo project of flutter native interactions through dart:ffi

License: Other

Shell 0.34% Ruby 0.09% C++ 4.05% C 94.33% Objective-C 0.03% Kotlin 0.05% Dart 0.91% Swift 0.03% CMake 0.17%

flutter_ffi_demo's Introduction

Readme

This is example project of how to use opencv with flutter::ffi utilities based on the tutorial in the blog post:

"Implementing a Flutter plugin with native OpenCV support via dart::ffi โ€“ Part 1"

"Implementing a Flutter plugin with native OpenCV support via dart::ffi โ€“ Part 2"

Preparation

Install the latest cmake (minimum version is 3.21.1)

brew install cmake
brew unlink cmake && brew link cmake

Add additional global params to you rc file

export ANDROID_HOME=/Users/$USER/Library/Android/sdk
export ANDROID_NDK_HOME=$ANDROID_HOME/ndk-bundle
export ANDROID_NDK=$ANDROID_NDK_HOME
export NDK=$ANDROID_HOME/ndk/23.0.7599858

Here 23.0.7599858 could be any version > 23.0.75..

Don't forget to switch you console to the new source!!

Prebuild opencv for both platforms

This will take some big amount of time cause we need to build opencv for ios and android for ALL architectures

cd src
sh prebuild.sh

For ios also need to call build.sh from the ios folder

This script will prepare ios framework file that will contain all c++ code. It also should be applied each time you change c++ code and need to check it or iphone

cd src/ios
sh build.sh

flutter_ffi_demo's People

Contributors

4boom04 avatar rutkayb avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.