#flutter #native #engine #access #component #texture #plugin

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

#418 in Game dev

Download history 961/week @ 2024-09-15 1180/week @ 2024-09-22 1076/week @ 2024-09-29 995/week @ 2024-10-06 1235/week @ 2024-10-13 1090/week @ 2024-10-20 1106/week @ 2024-10-27 1217/week @ 2024-11-03 1324/week @ 2024-11-10 1351/week @ 2024-11-17 1086/week @ 2024-11-24 1116/week @ 2024-12-01 1052/week @ 2024-12-08 1360/week @ 2024-12-15 651/week @ 2024-12-22 890/week @ 2024-12-29

4,006 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–13MB
~108K SLoC