Hacker News new | ask | show | jobs
by nimrody 3033 days ago
How is the integration of Flutter apps with the rest of the Android system/apps? Given that Flutter does not use the platform native widgets -- do Flutter apps look or behave different?

How difficult it is to use a Java library from Dart?

1 comments

Disclaimer: I work on the Dart VM and Flutter engine

The Flutter team has done an amazing job recreating Material and Cupertino (iOS) widgets, and I honestly can't tell the difference. Also, platform specific behaviors (e.g., the scroll bounce on iOS) are also preserved.

If you haven't seen a Flutter app in the wild, I'd highly recommend checking out the Gallery application on Google Play (https://play.google.com/store/apps/details?id=io.flutter.gal...). Here you can see all the available widgets for each platform and even toggle between iOS and Android behaviors.

Given flutter can call down to iOS with plugins, and given that the apps are native, apparently, is it not possible to natively use the actual iOS widgets instead of reimplementing them?
For widgets it's not just calling to iOS that matters, but being able to render the widgets as part of the painting process, which Fluter does as a completely separate process from how iOS renders. So to integrate it, you'd need something involving compositing native views properly and yet propagating touch events to them, or rendering native views on top but doing the right masking, or ...