Skip to content

Conversation

@a-wallen
Copy link

@a-wallen a-wallen commented Apr 21, 2023

I'm working on a bridge library for appflowy-editor so that we can dynamically load developer plugins in our rich text editor. We need KeyEventResult and a couple other classes.

@a-wallen
Copy link
Author

Right now the change is on my fork, we can fork the repo into our org if you don't want to accept the patches that we need to support appflowy-editor. I'm mainly I'm using this PR to establish some communication with you about generating these bridge libraries because hand-writing them is a lot of work. Any updates on that?

sdk: flutter
dart_eval: ^0.6.0
dart_eval:
path: ../dart_eval
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert this change

description: Flutter bridge library for dart_eval, enabling creation of fully dynamic Flutter apps and widgets that can be loaded from a file or the Internet at runtime.
version: 0.6.0
homepage: https://github.com/ethanblake4/flutter_eval
publish_to: "none"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert this change as well.

$CustomPainter.wrap(this.$value);
}

class $CustomPainter$bridge extends CustomPainter with $Bridge<CustomPainter> {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be completed

import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';

class $CustomPainter implements $Instance {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove wrapper class if using bridge

}
}

class $CustomPaint$bridge extends CustomPaint with $Bridge<CustomPaint> {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CustomPainter should be a bridge class, but CustomPaint should be a wrapper

@ethanblake4
Copy link
Owner

Thanks for this work @a-wallen ! I'm happy to accept it into flutter_eval (assuming the review comments are addressed).

As far as binding generation, I don't have any immediate updates to share, but your feedback is noted. I can tell you it will not be completed in the next few months (barring a major change like this project getting sponsored), but is certainly something I want to address. I assume you already know this, but ChatGPT and GitHub Copilot do a reasonably good job if prompted with a completed example of a binding class definition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants