VeryGoodOpenSource / very_good_templates

Collection of open-source templates created and maintained by Very Good Ventures.
69 stars 15 forks source link

feat: Using Pigeon for the platform communication #43

Open rekire opened 8 months ago

rekire commented 8 months ago

Migrated from VeryGoodOpenSource/very_good_flutter_plugin#148

Description

I didn't use it yet to be honest, but I think that using Pigeon is currently the state of the art for writing new plugins.

From 16.0.4:

Currently pigeon supports generating:

  • Kotlin and Java code for Android
  • Swift and Objective-C code for iOS and macOS
  • C++ code for Windows

So some fallback for Linux and Web would be required.

Requirements

Additional Context

Pigeon is a code generator tool to make communication between Flutter and the host platform type-safe, easier, and faster.

Pigeon removes the necessity to manage strings across multiple platforms and languages. It also improves efficiency over common method channel patterns. Most importantly though, it removes the need to write custom platform channel code, since pigeon generates it for you.

tomarra commented 7 months ago

Notes