INNER CODE UNIT · Rust

new

marc2332/freya · crates/freya-android/src/lib.rs:72

    pub fn new(app: AndroidApp) -> Self {
        Self { app }
    }
}

impl FreyaPlugin for AndroidPlugin {
    fn plugin_id(&self) -> &'static str {
        "android"
    }

    fn on_event(&mut self, event: &mut PluginEvent, _handle: PluginHandle) {
        if let PluginEvent::RunnerCreated { .. } = event {
            GlobalContexts::get().insert_context(self.app.clone());
        }
    }

    fn root_component(&self, root: Element) -> Element {
        AndroidRoot { inner: root }.into_element()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…