Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flutter renderer #2

Open
ghost opened this issue Sep 10, 2018 · 8 comments
Open

Flutter renderer #2

ghost opened this issue Sep 10, 2018 · 8 comments

Comments

@ghost
Copy link

ghost commented Sep 10, 2018

I see that the way you described Ribe a html offer tree feels very like flutter.

I was wondering is a html to flutter lib makes sense to build a flutter renderer.
There is one on GitHub and it pulls Wikipedia html, parses it and renders flutter objects.

Food for thought ?
It also is cool because you don't have to recompile

@tejainece
Copy link
Member

I will take a look.

But we can do better. nuts is very abstracted from the widget library underneath. An implementation of Flutter renderer for ViewRenderer would suffice. Currently there is only implementation of HtmlRenderer. You can also do platform specific conditional rendering. For example, if platform is web, use this Component, elseif platform is Flutter, use this component, etc.

@ghost
Copy link
Author

ghost commented Sep 10, 2018 via email

@tejainece
Copy link
Member

tejainece commented Sep 10, 2018

Wow there is conditional ? Like Vuejs has a formal DSL ?

Yes. With some cool rx sugar added. There will XML template engine as well later. But I am really hoping this gets accepted: dart-lang/sdk#34362

I presume your aiming for an agnostic layout so that the same layout works on web and flutter ?

Yes. Same UI tree targets different rendering backends. Sometimes though, one Component cannot directly target all platforms. In this case, you have to use platform specific Components based on conditional rendering.

@ghost
Copy link
Author

ghost commented Sep 10, 2018

Can you add setup to the readme ?
have not used webdev much for dart. Mostly only flutter.

EDIT: I just read your proposal. So for now this wont run without a custom build of dart ?

@tejainece
Copy link
Member

tejainece commented Sep 10, 2018

Can you add setup to the readme ?
have not used webdev much for dart. Mostly only flutter.

Sure. Will do this by tomorrow.

EDIT: I just read your proposal. So for now this wont run without a custom build of dart ?

What do you mean? This: dart-lang/sdk#34362? No, That will make things cleaner to write. Has nothing directly to do with nuts.

@ghost
Copy link
Author

ghost commented Sep 10, 2018 via email

@tejainece
Copy link
Member

Here is an example boilerplate repo: https://github.com/nutsdart/boilerplate

It is still early stage. Suggestions are welcome. PRs will be awesome!

@ghost
Copy link
Author

ghost commented Oct 22, 2018

ok thanks. Will check it out.

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

No branches or pull requests

1 participant