irondash_engine_context 0.1.0 copy "irondash_engine_context: ^0.1.0" to clipboard
irondash_engine_context: ^0.1.0 copied to clipboard

Easy access to FlutterView, FlutterBinaryMessenger and FlutterTextureRegistry for FFI.

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 the dylib containing Rust code must be loaded through System.loadLibrary before loading it from Dart code. System.loadLibrary must be called on main thread.

2
likes
0
pub points
72%
popularity

Publisher

verified publisherirondash.dev

Easy access to FlutterView, FlutterBinaryMessenger and FlutterTextureRegistry for FFI.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on irondash_engine_context