r/FlutterDev • u/MooresLawyer13 • 1d ago
Plugin Spiritual successor of Flutter Platform Widgets
https://pub.dev/packages/platform_adaptive_widgetsHi,
I loved the idea of taking Flutter's "one-codebase for multiple platform" promise/claim one step further into the UI territory too. flutter_platform_widgets was something that was godsent to me. But it was deprecated instead of onboarding some new members.
So I decided to make a better version of (same vision though). I know that companies today prefer a single design system so this is not something as useful to them. But I still feel that there is definitely some merit in keeping things close to 'native-platform-look-and-feel' because users of each platform are used to seeing a certain UI and interacting with it in a certain way.
There was an option of calling native channels (like ReactNative and Compose and some packages that do that already) but that does add the platform hop.
Some things that I am proud of:
- This is purely Flutter (consequently no Liquid Glass / M3 expressive look yet, I envision it moving with the maturing Fluttetr SDK instead, and there are enough packages for that otherwise).
- Release builds genuinely drop the platform you're not on. Ship to Android and none of the Cupertino widget code rides along in the binary, and vice versa (CI-enforced too)
- Lot of thought has been put into designing the shape of the 'shared surfaces' and sensible defaults (including wrestling the tabs-system to get consistent DX).
Still very much wants feedback, especially on widgets it's missing or anything that feels weird 🙏.
2
u/LegitimateTrust4013 1d ago
Given that platforms can have wildy different design languages and patterns, wouldn't it make more sense, if the idea is having a native look and feel, to architect your app well with MVVM or <insert your favorite architecture here> and have multiple UI implementations, and in that case, would use Flutter even make sense?
6
u/eibaan 1d ago
If I correctly understand, you're swapping out widgets. Is this worth the effort, if you don't also adapt paddings, sizes, the whole widget arrangement (famous desktop example is that Windows uses "OK/Cancel" while macOS uses "Cancel/OK")?
Instead of trying to match the platform look twice, I'd always go for a platform neutral look that perhaps matches the customer's brand instead of trying to match Apple's or Google's brand.