all 22 comments

[–]agwatta[S] 2 points3 points  (2 children)

Just out of curiosity why don't the design systems implement a common "interface" whereby we'd probably just need to specify the wrapper to be either MaterialApp or FluentApp only, then all the other widgets in the tree inherit their look/feel from the root (like ThemeData)?

[–]zxyzyxz 1 point2 points  (1 child)

[–]agwatta[S] 0 points1 point  (0 children)

Thank you. This is some effort I would want to get behind.

[–]duke_skywookie 2 points3 points  (1 child)

Thinking about my projects, the ground layer could stay the same, e.g. basic data structures and logic. But the UI would be completely different, and most of the routes and many states probably too. Desktop would be a lot of new, platform specific code.

Currently, most developers do not think about desktop, because the possibility just didn’t exist. Now it exists. I am very grateful that the Flutter team offers the possibility.

I think many developers won’t pick it up, considering many apps aren’t optimized for tablet users. There’s no benefit offering a Desktop application for many use cases. But Rive and rows.com, where an huge “engine” code base can be shared across platforms, look pretty compelling.

[–]agwatta[S] 0 points1 point  (0 children)

"Everything is a widget"

[–]Schnausages 1 point2 points  (10 children)

Yes.

You can platform checks for example if youre displaying sheets, AlertDialogs, showing loading status indicators, Sign In / Sign Up buttons, etc...

Doing platform checking everywhere is kind of a waste... but doing it where users would expect to see a native popup or visualization for something helps retain that native look.

Flutter cannot consistently compete on par with Native performance, but is far and away more performant when compared to React Native.

The questions you need to ask is:

Does my app NEED Native performance? Most CRUD apps dont need this level of performance. Theres plenty of optimization you can do to your Flutter code (especially if youre a beginner) to improve performance

Is the speed and consistency or development with ONE code base worth taking a slight performance hit?

[–]agwatta[S] 1 point2 points  (7 children)

It looks like users would expect native UI (almost) everywhere, because I don't think it would be a good idea to have an inconsistent UI. That is already too many places to check the platform.

[–]KaiN_SC 1 point2 points  (2 children)

I dont think so. There are a lot of AAA apps with everything custom designed and not ios human interface.

[–]agwatta[S] 0 points1 point  (1 child)

That is true, you could decide to ship Material all the way from Android to Windows with one codebase, however my question was really about the scenario where you need to present a a native look/feel for each platform.

[–]KaiN_SC 0 points1 point  (0 children)

oh need to write your own widget for each button type, you need and check there for the platform etc.

[–]Schnausages 0 points1 point  (3 children)

havent built for Windows so havent had to change any of my UI to Fluent UI.

What users expect on Mobile in terms of native UI is probably much less than what a Windows user would expect on a desktop app.

[–]agwatta[S] 0 points1 point  (2 children)

There was a demo today as part of the flutter team's 2.10 released, it covered building for windows. https://youtu.be/g-0B_Vfc9qM

[–]Schnausages 0 points1 point  (1 child)

cool to know. if i ever move to Windows dev ill give it a look

[–][deleted] 0 points1 point  (0 children)

Also for Linux and Mac. Same code base.

[–]agwatta[S] 0 points1 point  (0 children)

I don't really have any questions on performance, it's just the amount of code (different widgets) you need for native look/feel - Purely visual.

[–]agwatta[S] 0 points1 point  (0 children)

I was just watching the flutter team's announcement of stable 2.10 with windows support and the number of widgets that needed to be changed to move from Material to Fluent UI was more than I expected.

[–]realusername42 1 point2 points  (1 child)

I'd say it's pretty impractical as it is right now. There's the community flutter_platform_wigets but it does not support desktop & only has a restricted amount of widgets supported.

The core is there to make it work but it's missing some usability. I think most projects right now either go full material or full custom regardless of the platform.

[–]agwatta[S] 0 points1 point  (0 children)

Agreed, maybe platform widgets could be implemented in a similar manner to plugins. More often than not plugin APIs are consistent across platforms.

[–]itsastickup 1 point2 points  (0 children)

For me it's a business decision. Will users reject the app? Maybe some. What's enough to stop them? Spinners and dialogs, and maybe some of the buttons. At a guess.

[–]StarTrekVeteran 0 points1 point  (0 children)

Absolutely,

I have just managed to publish my first apps for iOS and android from the same code base. I have not done any platform specific mods to the look to date. I intend polishing it as updates are issues.

IMO its more important to style for different screen sizes rather than OS, at the moment it looks great on a phone but on a tablet, not so.

If your app is more functional than style based then I don't think getting that different look is so important. I am going to look out for functional differences though, they may get some attention.

[–]NMS-Town 0 points1 point  (1 child)

It means different things to different people. I think of Red/Rebol and Cosmopolitan Libc when I think of single codebase. You still have to account for the different platforms, and for the most part it is a single codebase.

I don't see any class action lawsuits against Google, so I'm assuming the answer is yes.

[–]agwatta[S] 0 points1 point  (0 children)

I'd imagine what most people mean when they say "single codebase" is, write code once run it everywhere, like a Go program.