#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

#10 in #flutter

Download history 491/week @ 2024-01-05 417/week @ 2024-01-12 479/week @ 2024-01-19 693/week @ 2024-01-26 934/week @ 2024-02-02 775/week @ 2024-02-09 1437/week @ 2024-02-16 1050/week @ 2024-02-23 1276/week @ 2024-03-01 986/week @ 2024-03-08 884/week @ 2024-03-15 1223/week @ 2024-03-22 1075/week @ 2024-03-29 1549/week @ 2024-04-05 1787/week @ 2024-04-12 1177/week @ 2024-04-19

5,783 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