#flutter #engine #native #component #access #plugin #dart

irondash_engine_context

Easy access to FlutterView, FlutterBinaryMessenger and FlutterTextureRegistry for FFI

9 releases (4 breaking)

0.5.0 Dec 26, 2023
0.4.0-dev.2 Nov 29, 2023
0.3.0 Jul 28, 2023
0.2.1 Jul 1, 2023
0.1.1 Nov 15, 2022

#163 in GUI

Download history 434/week @ 2024-01-17 634/week @ 2024-01-24 892/week @ 2024-01-31 839/week @ 2024-02-07 1268/week @ 2024-02-14 1184/week @ 2024-02-21 1329/week @ 2024-02-28 913/week @ 2024-03-06 887/week @ 2024-03-13 1078/week @ 2024-03-20 1129/week @ 2024-03-27 1517/week @ 2024-04-03 1771/week @ 2024-04-10 1392/week @ 2024-04-17 1206/week @ 2024-04-24 1102/week @ 2024-05-01

5,756 downloads per month
Used in 3 crates (2 directly)

MIT license

44KB
1K SLoC

irondash_engine_context

Flutter plugin that provides access to Flutter engine components (like view or texture registrar) from native code.

Example

Dart code:

    import 'package:irondash_engine_context/irondash_engine_context.dart';

    final handle = await EngineContext.instance.getEngineHandle();
    // pass the handle native code (i.e. through FFI).
    nativeMethod(handle);

Rust code:

    use irondash_engine_context::EngineContext;

    let context = EngineContext::get().unwrap();
    let flutter_view = context.get_flutter_view(handle);
    let texture_registry = context.get_texture_registry(handle);

On Android, EngineContext can provide JavaVM instance and class loader that has loaded Flutter application:

let java_vm = EngineContext::get_java_vm()?;
let class_loader = EngineContext::get_class_loader()?;

Dependencies

~0–14MB
~123K SLoC