FlutterDesktop and C

Aseem Wangoo
Flutter Community
Published in
5 min readDec 29, 2020

--

Call C library from FlutterDesktop MacOS

How to call c library from FlutterDesktop (MacOS)?Hmm….

All in one Flutter resource: https://flatteredwithflutter.com/flutterdesktop-and-c/

Begin…

Level: Intermediate

Pre-Requisite: Install package FFI

This article assumes that the reader has knowledge about FFI. In case not, check this.

We will cover briefly about

  1. Creating C Library
  2. Integrate C Library in Flutter MacOS
  3. Call from Flutter MacOS

Note: We won’t be explaining in-depth about Dart FFI as there are good articles dedicated to it.

FlutterDesktop and C

Creating C Library

Every complicated thing starts with a basic thing. Let’s create a simple C library (Hello World)

Introducing CMake and makefile

--

--