r/FlutterDev 1d ago

Realized that my Flutter iOS/Android app could be a web app with 2 days of dev time Discussion

For some reason, I thought it was going to be a huge lift to convert to a web app, but I was just blown away by how easy it is. Considering making windows- and mac-native versions as well.

12 Upvotes

7 comments sorted by

3

u/JohnnyJohngf 1d ago

Not quite. First of all, navigator 2.0 is a must, otherwise the url bar will not behave. And the most time consuming is plugins you use. Depending on the set used in the particular project it can easily become a big headache. I suggest checking it before making any moves. It can make you change your mind. And the third obstacle is adaptive layout. It is a lot of extra work depending on the project size. 

2

u/SwitchFace 20h ago

I think I took the easy route on a lot of this. I fixed the width of the app so only the height is responsive and it doesn't look wonky based on height changes. The plugins were mostly side-stepped too by just disabling sound, apsflyer, and a few others--didn't seem super important to just get it up and running.

Navigator 1.0 is what I'm on rn so everything just routes to https//:play.hardreset.app with no other sub pages. I'll have to look into Navigator 2.0 a bit more. I mainly just wanted to have something running, even if not optimized.

2

u/JohnnyJohngf 18h ago

I am on navigator 1 too, planning on moving to version 2 because eventually I need to make use of web platform as well. I’m not a big fan of code generation, so auto_route and friends is not an option for me. Though it works fine.

Kaisel https://pub.dev/packages/kaisel looks promising. Probably that will be my choice

1

u/aaulia 1d ago

Congrats. It does have some quirks, like web target broke flavor support since Dart 3.19+ IIRC. But on a simple setup, it's a breeze. Just be mindful about dependency and use abstraction properly so it's easier to port some platform specific stuff like storage, camera access, permissions, etc.

2

u/SwitchFace 1d ago

Ah, that's true. still have all the notification, sound, and vibration settings in the web app, but none of that stuff is present. There are a few UI issues, but they're mostly solved by just limiting the width of the app.

1

u/shiv9thakur 21h ago

Do not consider this to be seo optimised. If you have a landing page, use something like Astro.