Skip to content

A Standard For Implementing Custom UIs #97496

Open
@Hawmex

Description

@Hawmex

Hi,
It's been 2 months since I've ditched HTML, CSS, and JS for Flutter and I haven't looked back. I love the declarative style of Flutter and Dart itself.

What's the problem?

What really bothers me is I find it hard to implement completely Custom UIs. I mean even when I wanted to use a custom font, I had to depend on material.dart and use Scaffold to make it work. I don't even want to start talking about the frustrations of theming a material app in flutter. But this was not a problem using HTML, CSS, JS. They basically give you simple and minimal elements and then let you do whatever you want with them or use whatever UI package you want, such as Tailwind, MUI, etc.
So, It's either a matter of Flutter lacking documentation on Custom UIs or me not reading enough docs about them.

Any other problems?

Well, if you just take a look at the reported issues, they're mostly about material.dart and cupertino.dart. I feel like Flutter Team is spending most of their time, effort and energy on these two UIs instead of the framework itself. And still, Flutter is far behind from Material 3 spec (and even Material 2, because material.dart uses 2014 typography by default.).

My Ideal Flutter

So my ideal is:

  • The main Flutter package should contain and export basic widgets of the framework (GestureDetector, StatelessWidget, StatefulWidget, etc.). These can be currently found in widgets.dart. This way, Flutter Team's efforts are concentrated on the framework itself.
  • material and cupertino should come in seperate packages (and export the main Flutter package) and be maintained by Flutter community more.
  • More tutorials and docs should be provided on making UIs with the main Flutter package rather than making them with material or cupertino. This way more people will know how underlying widgets of material and cupertino work and can take part in maintaining them or even make their own UIs in their apps and packages.

This way we will be able to see more Flutter UI packages and a more diverse set of Flutter apps in terms of UI on the market.

After all, these are just my ideals and may be far from reality but I really like to see some discussion on this matter and finding the best solution to it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectc: proposalA detailed proposal for a change to Flutterf: material designflutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.team-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions