4 ms·
> Maybe a stupid question for Flutter users, but why are there two versions for every UI element in the source code? The author is using 3rd-party UI libraries
by PragmaticPulp 5y ago
> Maybe a stupid question for Flutter users, but why are there two versions for every UI element in the source code?
The author is using 3rd-party UI libraries that have each been designed to be platform-specific.
Traditionally a Flutter app would use the built-in UI components that are not platform specific, but then you end up with a Material-style look and feel.
There's not actually anything stopping the app from running with the macOS style UI on a Windows machine or using the Windows-style app on the web platform because they're all inherently cross-platform. In fact, the Windows-style UI package actually has compiled to Flutter web and you can use it straight from your browser: https://bdlukaa.github.io/fluent_ui/ https://bdlukaa.github.io/fluent_ui/
The decision to build separate UIs for each platform was the author's choice, but it's not a traditional Flutter practice.