|
|
|
|
|
by roughike
2990 days ago
|
|
I've been using Flutter for a year now, and I've loved it since the first time I gave it a try. In my work, I've been using other cross-platform technologies, such as Xamarin and React Native briefly (actually currently doing a customer project with RN). In my experience, RN is not that bad and mostly gets the job done, but I've grown to like Flutter more. The tooling and documentation are top-notch ("it just works"), and since it custom renders everything, the UIs are consistent across devices and platforms. For example, with React Native I had to recently fight with a third-party library to have gradients (RN doesn't support them), but couldn't get the library working. Another thing that I heard from colleagues was that React Native can introduce a lot of breaking changes between versions. I have a one-year-old hobby Flutter project and I was still able to run that without any pain when the first beta came out. Being a native Android & Java guy for the last 5 years or so, having the strong type system of Dart also felt more natural to me than Javascript. |
|
Some good points of Flutter so far:
* Hot reloading is fast, much easier to iterate on designs and experiments
* Plugins seem to be easy to make, they made an architecture that focuses on minimal boilerplate
* Being able to use async-await syntax on a whole UI view is a cool idea (like Android's onActivityResult() with much less typing involved). Push a view onto the navigation stack, let it collect input from the user, pop off the stack with a data structure representing the user input)
* Animations are easy
* Minimal opening of Xcode. Most days I can get by without ever opening it.
* Data flow architectures like the Elm Architecture or Redux are well supported
Some not-so-good points:
* Having null
* Material design is pushed way too hard - Cupertino widget documentation/examples are lacking
* Code generation needed for JSON parsing
* State for StatefulWidgets are generic over the Widget and not the other way around - I would have expected a StatefulWidget to be generic over a State e.g. `MyHomePage extends StatefulWidget<MyHomePageState>`
* Because of the previous point, the UI building function, build(), is usually on the State class and not the Widget class
* My relatively barebones app is around 33MB on iOS
Overall though I like it! Lots of good ideas and tooling. I one day want to create something with a similar architecture using a language like Rust instead of Dart, and native UI components instead of reimplementing the entirety of Android and iOS component behavior.