1 2 3 4 5 6 7 8 9 10
impl {{ bridge_name }} { /// Create a bridge from a Dart callable. pub fn new( cb: impl Fn(String) -> DartFnFuture<String> + Send + Sync + 'static, ) -> Self { Self { callback: std::sync::Arc::new(cb), } } }