Does Flutter automatically display Cupertino UI in iOS and Material in Android with a single codebase?

后端 未结 4 479
温柔的废话
温柔的废话 2021-02-04 23:13

I need to know whether Flutter will render the iOS Cupertino style on iOS and Material on Android with a single codebase. I want to know this before starting to develop my app w

4条回答
  •  余生分开走
    2021-02-05 00:04

    These capabilities are under development. I suggest to look into this library: https://pub.dartlang.org/packages/flutter_platform_widgets

    Other than that, there is a lot you can do already, even without this library. Everything depends on your resources, requirements and complexity of your project.

    For example, if you are working alone or in a small team, your project's complexity is probably not overwhelming, and your entire application will consist only of a couple of dozens of Widget derived classes at max. In this case, maybe you can deliberately program the platform-adaptive behavior in your custom Widget classes, so that you'll be happy working with them long-term.

    This workflow is not always applicable, and may seem complicated at the beginning, but it will become more natural later.

提交回复
热议问题