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

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

#384 in Game dev

Download history 1274/week @ 2024-07-20 1226/week @ 2024-07-27 1363/week @ 2024-08-03 1048/week @ 2024-08-10 1132/week @ 2024-08-17 1892/week @ 2024-08-24 1006/week @ 2024-08-31 1131/week @ 2024-09-07 953/week @ 2024-09-14 1144/week @ 2024-09-21 1139/week @ 2024-09-28 969/week @ 2024-10-05 1222/week @ 2024-10-12 1060/week @ 2024-10-19 1104/week @ 2024-10-26 964/week @ 2024-11-02

4,515 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