How SelectableText Widgets Broke Flutter ListViews (Now Fixed)

With the first real world usage of Kyanite came the first bugs. One of the biggest bugs was an apparent memory leak. Part of it was coming from an extraneous image query code that I no longer needed so removed rather than fixed. However most of it was coming from the unlikeliest place. There are a few common text widget types but the two I was using were: Text and SelectableText. SelectableText was used anywhere I wanted users to copy/paste text of posts/comments/etc. It turns out that was the source of not only my memory leak but some performance problems as well.

NOTE: Because of how responsive the Flutter team is there is already a patch in pull request but I wanted to explore this here anyway. The article shows how ListViews are supposed to operate, how one builds performant ListViews with builders, etc. Also until the fix does go into a mainline version it will be important people keep this caveat in mind with SelectableText widgets.

More …

Result Monads in Dart and Flutter

One of the idioms that I started using for function returns was the Result Monad. I first got excited about it when learning Rust, where this is an intrinsic part of function returns. It wasn’t until reading Adam Bennett’s blog post on the Result Monad library in Kotlin that I really felt the impetus to use it in other languages. I don’t always use it, especially in quick/simple things, but for building an API/library I have found it very useful. When coming over to Dart I tried to use something similar. There were some monad libraries or the “Either” concept in functional programming libraries. None of them had the flows and syntax that I liked in my favorite Kotlin Result Monad Library except for one library which looked abandoned and had a Flutter dependency so couldn’t be used in Dart only projects. I therefore decided to write my own and publish it. This post is an exploration of that. The library source code and issue tracker is here with the pub.dev entry here.

More …

Fixing Facebook's Borked File Encoding

While working on the Kryanite Facebook archive reader I ran into a frequent problem of garbled text. Ninety-nine percent of the time everything would be fine but then I’d see a string of weirdly out of place characters. I had assumed that perhaps the default encoding picked by the Dart file reader was to blame. Perhaps it should have been UTF-16 instead of UTF-8, or something along those lines. Experimentation didn’t help the problem. It turns out the problem is one of Facebook not properly encoding their files. With the help of another blogger who discovered the problem and fixed it I was able to create Dart code which fixes it for my uses as well. Here is the snippet. Read below the fold for more details.

More …

Real World Flutter Desktop Experience With Kryanite

While dabbling with a technology is a hobby and can be fun, it really isn’t until I try to build something with it that I can truly have an appreciation for whether it really works or not. I’m now at that point of exploration with Dart and Flutter for cross platform desktop development. I opaquely mentioned this topic in this post. Yesterday I released a beta of my first application written in Flutter Desktop, called Kryanite. I’ve gotten to a comparable stage of work with other cross platform desktop tools over the past couple of years. Obviously none of which were quite totally satisfactory since I kept looking around. That search may be over now. At this point I can say that Flutter Desktop is by far my favorite cross platform development platform to date and I’m planning on doubling down on using it, and more generally Dart, in my development efforts.

More …

Harnessing Your Facebook Data With the the Kyanite Facebook Archive Viewer

It is no secret that Facebook has been expertly doing the vendor lock play to expand and retain their user base. If all of your family and friend photos, event information, thoughts on current events, etc. are solely in their database then you have no place else to go once you finally join and start using it. It becomes more reinforcing the longer you are there and the more friends that join and do the same thing. In recent years though due to a combination of legislative action, public pressure, and fear of regulation they started allowing users to export all of their data from their system. It’s kind of hidden and can be a little confusing but once it’s done you can get a giant ZIP file archive of all your data. While it meets the letter of what was requested the fact is that that data is not digestible to the average user. To anyone that wants to actually use their Facebook data they still are stuck doing it through their system.

This post is about a preview release of a new tool I am working on to actually be able to use your Facebook Archive, which is called Kyanite. This tool is available for Windows, Mac, and Linux desktops. It will allow you to view, search, and extract data from your archive in a human digestible way. In same cases, like with search, it’s even more effective than the built in tools Facebook provides. Below is a quick tour of the product and how you can start using it. You can go right to the product page to start using it today. Also check out this post on how to get your Facebook Archive. Now on to the details of the Kyanite…

More …