Milestone: Zero Inbox can handle HTML emails now. There are some rough edges but it's good enough for today, and maybe even for the launch.
Many of us don't realize that a lot of the emails we receive are actually not plain text. They are HTML with CSS and everything. The HTML email uses a subset of the HTML tags and doesn't support JavaScript. But, that doesn't change the fact that if you are building an email client, you have to be able to render HTML.
This is easy if you are just building a web app. Web apps run in browsers and HTML rendering is the core functionality of a browser. It's not as easy if you are building a mobile app. Both Android and IOS offer a browser component that can be embedded in mobile apps - WebView in Android and WKWebView in IOS.
Spent yesterday wrangling the WebView/WKWebView library for Flutter. It was disappointing to realize that the official library (webview_flutter) lacks some important functionality, such as setting zoom and choosing a font-size. Especially because both WebView and WKWebView support this functionality. So, I ended up using a 3rd party library called (flutter_inappwebview), which still partly uses WebView under the hood I believe.
Another quirk I had to deal with was the layout needs of the WebView Flutter Widget. It really didn't like being in a container that gave it infinite height. I ended up wrapping it in a container that resizes itself after the WebView component is done rendering the HTML so that it knows about the height of the content. It's gross. I know 🤷♂️