Why Flutter needs a service like Expo
For those of you who haven’t used Expo before, here’s an extract from its documentation:
Sounds great, right? Let’s take a closer look at that and find out what it actually means. Then we’ll look at whether Flutter could benefit from such a service.
The first step in using Expo (project initialisation) gives developers access to a variety of templates (e.g. TypeScript and React Navigation pre-installed) to start from with a single CLI command.
Is this needed in Flutter? At first glance, it might seem like this feature is not needed for Flutter. However, this isn’t all these commands could be used for. Just think about all the time you spend configuring your Flutter project when creating one from scratch. One great example is structuring your project Dart files in a scalable way, and configuring your state management architecture (BLoC, Redux, MobX etc). An Expo-like command could allow you to type in a command like Expo init, which would then give you a variety of different templates. These could be heavily opinionated, much like a Rails app is. However, it would save developers a lot of time. It would also help beginners get to know how to write and architect maintainable, scalable apps. (This is sorely missing from the Flutter ecosystem).
Expo also creates and maintains many plugins for React Native apps using its managed workflow. This is necessary since React Native (as does React) likes to keep its core small, and also the React team doesn’t produce many extra packages.
Flutter doesn’t suffer from these problems as much, with the Flutter team doing a great job of supporting and maintaining many plugins (e.g. camera, connectivity). However, there are some critical areas which aren’t touched by the Flutter team. One example is the Facebook login plugin, which looks like it is about to be deprecated. Either the Flutter team needs to expand and work on more plugins, or a Flutter version of Expo needs to pick up the slack. Developers would feel safer using a plugin supported and well-maintained by an organisation, rather than a single developer.
One-command publishing is an amazing Expo tool. It allows you simply to run expo publish and your app will be immediately hosted on a CDN (though not on the Play or App Store). This can then be shared with others.
Without a doubt, this would be a really cool tool for Flutter to have.
However, an even cooler feature is the Expo build service. With this, you can let Expo handle everything from your Apple distribution certificates to provisioning profiles — something which is a real pain when dealing with iOS.
Currently, Flutter developers still have to deal with the annoyances of code signing on a platform-specific level. This all needs to be managed for iOS and Android. Therefore, when it comes to publishing apps on the app stores, the magic of cross-platform very quickly loses its lustre.
Managing code signing and other platform-specific publishing idiosyncrasies would make Flutter development truly cross-platform. Of course, developers would still need to register with both Google Play and the App Store. However, they could register their credential with the single Expo-like service. All the rest, including code signing, would be handled automatically.
Hot code push
Expo provide a service for hot code push, which allows developers to push updates to their apps without users having to install a new update.
This is pretty cool, but the Flutter team has rejected this feature suggestion. To be fair, the reasons for this are pretty valid.
This isn’t a deal-breaker.
There’s more I could have talked about, but these are the main areas where an Expo-like Flutter service would make Flutter a no-brainer for rapid product development.