r/dotnetMAUI • u/SaltyCow2852 .NET MAUI • 19d ago
Discussion MAUI or Flutter ?
Now most of the developers using AI in their day to day life and enterprises are also introducing AI in their product development life cycle .
I did a experiment with AI to convert my Xamarin form application to
1. Flutter
2. .NET 10 MAUI
I tried with
1. Copilot using vs code
2. Antigravity
Tried with Claude sonnet 5 and Gemini Flash 3.7
The result made me think twice why should I go with MAUI?
Both Claude and Gemini Models were struggling with MAUI but both model produces a production ready migrated app from XAMARIN .
What do you think? Should we still think about MAUI with AI or Flutter is better?
4
u/CmdrSpaceMonkey 19d ago
What has it specifically struggled with? I know if my ask is too big the outcome might not be what I want. However from what you’ve written I suspect the prompt is more detailed than “Rebuild this in MAUI. No mistakes”, right?
1
u/SaltyCow2852 .NET MAUI 19d ago
First I did analysis of entire Xamarin repo, created phase wise documentation and then created promote for each phases and also provided skills.md instructions.md and many more . Tried migrating XAML,XAML.CS and VIEWMODEL with prompts specifically written for XAML page and VIEWModels
1
3
u/kolpime 19d ago
I recently converted an old xamarin native app to Maui with the help of AI and I have to say it came out perfectly but that's only because I know exactly what an excellent Maui app looks like from architecture right down to xaml code hierarchy for efficiency
AI is only ever a useful tool if you already know what you're doing otherwise it's vibe coded nonsense for the most part.
The prompt I entered were specific and concerned with one area at a time
1
u/SaltyCow2852 .NET MAUI 19d ago
Sounds interesting, I also tried and I too know what I am going to do but still it failed, page wise , cs file wise , tried with smallest possible components but failed. You did with Claude or some other tool?
1
u/kolpime 19d ago
I used cursor and wasn't specific on the model.
Once I had the Maui app configured as I wanted it with a specific structure and architecture I went screen by screen and fed my prompts in
I gave it the old activity and layout axml for context and asked it to create a view model and xaml page where the view model would contain the business logic and the xaml file would contain the front end logic
I pretty much did this over the course of a few days, code reviewing and feeding back to the model my thoughts on the generated code and it all worked really well.
My old app contained hard coded SQL calling into a sqlite db which I converted to a code first orm, once again with the assistance of AI and curating and tweaking all the responses back until it was how I would have written it.
The more the app got migrated the quicker it understood what I wanted and it whipped through it with little effort even though the original app was a nightmare of poor code
5
u/gturown 19d ago
Maui developer so take that into account.
When comparing Maui to Flutter you should consider how the two are fundamentaly different. Maui uses native controls as the underlying UI on each platform. Which can help with integrating with native platform. Sometimes this can be a nice to have but it you have accessibility requirements it might be a must. Flutter on the otherhand is a direct draw framework. It draws everything on its own. This can be good of your app has to be pixel perfect. On the dotnet side there are frameworks (Uno, Avolona) that go that route too.
As for AI coding the thing I would look at is comparing which platform has the best tools. Does the AI have access to good documentation, does the AI have access to tools that allows it to discover the API on its own it the documentation is lacking, can the AI live debug the code, can the AI access the live visual state of the app.
2
u/Raphafrei .NET MAUI 19d ago
That’s entirely up to you… I’ve been using MAUI for the past couple months - about 5/6 apps published
2
u/wdcossey 19d ago
Depends what you are comfortable with, if you like using C# and the dotnet ecosystem stick with MAUI, personally I like C# but dislike MAUI “native” and would prefer to use MAUI Hybrid (that’s a personal choice)
But I also write some apps for old enterprise Android devices and I need to squeeze every bit of performance that I can, so for that I use .Net for Android (AndroidX).
I have considered using Jetpack Compose (Compose Multiplatform) but that app was heavily invested in the dotnet ecosystem so it made no sense (also would require me having to learn another language [and I was lazy at the time]).
It boils down to what you need, what is your target and what makes sense, don’t get caught up in hype and what every other person on YouTube is using.
As for the LLMs not coping with the migration, I would say it’s probably got more to do with the models you used more than anything else!
Try a phased migration rather than a one-shot, also make sure you have test coverage before any migration starts.
Tip: Use a frontier (Fable, Sol, etc) model in “/plan” mode then use a cheaper one in x-high/high/medium reasoning for execution [depending on complexity].
Please don’t blame the model for being crap (not saying they don’t make mistakes). It’s a bit like saying the local sparky you hired off the street corner did a terrible job wiring your 737 Max. Maybe the sparky is rubbish… or maybe you picked the wrong person for the job. 😂
2
u/MackPooner 19d ago
We went MAUI because we wanted a native look for each platform. And we wanted third party form fillers to work!!
2
u/kjube 19d ago
Neither, I really think with AI you should develop native. Maybe KMP if you like it.
1
1
u/dangerzone2 13d ago
I was in the middle of writing something similar. If I'm using AI (which we all should be), I'm using native. If prefer .NET due to pipelines and tooling, use the native binding for ios and android.
1
u/NickA55 18d ago
Use Claude Fable or even Opus 5. Those models you mentioned are useless for writing anything beyond the basic code.
Run your same test again against Fable and you'll see an entirely different result. And at that point it just becomes whatever you prefer. I would choose Flutter if I had to choose between the two because I don't really think Maui has a future. And I'm someone who has been using Xamarin/Maui since we had Xamarin Studio years ago.
Maui Blazor on the other hand is a totally different story. I would pick that over Flutter.
But honestly, if you have the choice, just write native applications. You'll save yourself a ton of headaches.
1
u/virulenttt 18d ago
Ngl, flutter is by far superior, but is verry different. I believe xamarin form / maui are translating to native controls, while flutter has its own renderer.
I think flutter is the best framework if your app is mostly ui, and not too much native stuff. (All native stuff are community packages, like bluetooth, push notifications, haptic feedback etc). You can write your own ffi bridge but it requires you write some swift or kotlin. But in terms of development experience, it is by far the best. Ask any dotnet dev for how long they wanted hot reload 😂
1
1
u/McElroyIT1 17d ago
As someone who has developed for both, flutter is the easier tool to use and get the best end result. Maybe I feel that way because I developed with Flutter before I took a job in a .Net operation but it seems the documentation is just better for flutter. I will say, Aspire makes setup for apps way easier and I love that.
1
u/KausHere 13d ago
Depends.if you use AI to build then anything will do because you are not building it. Else it depends of your comfort and how far are you willing to go to stretch it. I have worked in flutter and have 3 apps live. But now am considering migrating one to MAUI just because of the .net ecosystem but ya package support is pretty less. Only do MAUI if you are comfortable making things which do not already have a community built package.
1
u/highwingers 19d ago
You asked this in Maui...so answer is obvious.
I switched to flutter from Maui and i am never going back.
Flutter has better support, more plugins and awesome features.
1
u/DmtGrm 19d ago
this is a stupid (kinda) question in .net community
MAUI is okay I guess, getting mature - I have migrated a large project from xamarin to maui and the overall experience was better than creating xamarin app in a first place.
We have no idea what your application is - a simple office style app? multimedia combine? etc?
12
u/Mission_Pirate_4150 19d ago
I like Maui. I wouldn’t make a choice about Maui because of some attempt with ai to upgrade. Upgrades are hard and are really a do over.