jaspr icon indicating copy to clipboard operation
jaspr copied to clipboard

feat: Flutter backend for jaspr

Open lukehutch opened this issue 3 months ago • 6 comments

What would be the feasibility of creating a Flutter backend for jaspr, which would allow proper native Web applications and native Flutter applications to be created from a single jaspr codebase? (I don't want to create mobile apps that are just a thin wrapper around a webview.)

lukehutch avatar Sep 05 '25 20:09 lukehutch

What is a flutter backend? Can you explain in more detail?

schultek avatar Sep 06 '25 12:09 schultek

What I mean is using the jaspr API (which looks like Flutter but is not Flutter) to build web UIs for the browser, but also Flutter native apps, from the same codebase. In other words, mapping the jaspr API onto to Flutter API.

lukehutch avatar Sep 06 '25 16:09 lukehutch

Could certainly be interesting to explore. But not by me anytime soon, this isn't a goal of Jaspr rn and I have lots of other priorities.

schultek avatar Sep 10 '25 21:09 schultek

What I mean is using the jaspr API (which looks like Flutter but is not Flutter) to build web UIs for the browser, but also Flutter native apps, from the same codebase. In other words, mapping the jaspr API onto to Flutter API.

I think this is a cool idea for some future concept; however, I think the current way that Flutter works kind of doesn't play well with Jaspr especially with the plethora of widgets you would need to build in Jaspr to match that of Flutter's.

exoad avatar Oct 08 '25 14:10 exoad

You are missing my point. I am only suggesting that the widgets that Jaspr already supports be able to be rendered not just to an HTML DOM, as currently works, but also to a Flutter widget tree, for accelerated rendering on mobile platforms. Jaspr doesn't need to support all of Flutter's widgets: it just needs to be able to generate Flutter calls for all of Jaspr's widgets.

lukehutch avatar Oct 08 '25 18:10 lukehutch

Ah ok, I understand, seems really convenient then, but what about styling? I am guessing you would need to support some form of converting things like padding and all of that to Flutter's widgets.

exoad avatar Oct 09 '25 00:10 exoad