Flutter: What Material Widgets are working on iOS?

Issue

Does anybody know: Can I build an iOS app completely with Flutter’s Material Widgets, or are there any functionality issues?
Is there any documentation on what Material Widgets are working on iOS?

(I’m not talking about design / UX implications here…)

Thanks!

Solution

All Material widgets or Cupertino widgets work in the two platforms (iOS and Android, and also in the web if you wanna try the Flutter beta) and both of them change its UX behavior based on the platform (like the way the physics of the scroll view when you pull or the look of the top navbar).

The Flutter works as a canvas that draws everything, so the UI does not depend on the target platform.

But if you start to mix Material with Cupertino you will have problems because there are some Widgets, like Scaffold, that expect only Material widgets.

You can see that what I am talking about is true seeing the source code of the widgets. In the Scaffold (a Material widget) there is a change of behavior based on the platform: https://github.com/flutter/flutter/blob/1ba4f1f509202f3d2ec16f053edcbe2df6b7107e/packages/flutter/lib/src/material/scaffold.dart#L2481

Here you can see in the first 15 seconds the Flutter Team member saying that the Material works both in iOS and Android and the same apply to Cupertino. There is no restriction in using Cupertino or Material to build multi-platform applications. These are some of the advantages of the Flutter, everything in the screen is drawn pixel by pixel by the Flutter.

Answered By – Eduardo Vital

Answer Checked By – David Goodson (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *