Hixie's Natural Log

2016-05-27 20:08 UTC Flutter: Embrace the yak shave

For today's Flutter update, I will just describe what I'm currently trying to do.

I want to write a PaginatedDataTable widget. This is a wrapper around a DataTable, which I implemented a few weeks ago, with the header and footer that you can see in the Material Design specification:


Doing this required me to make some changes involving the intrinsic sizing part of our RenderObject API (which I designed). This was the final straw for us, though. We've been feeling that this API was too complicated for a long time. It takes BoxConstraints, but most implementations don't know how to really use them, and most callers just pass unconstrained values.

So I start working on simplifying our intrinsic sizing API. Instead of BoxConstraints (which is min/max width and min/max height), I'll just pass in a single value, the height (for intrinsic width APIs) or the width (for intrinsic height APIs).

For reasons I've now forgotten, doing this required me to do something involving our graphics API, but the documentation for that part of our API was defficient. We try to follow the rule that if you look something up in our documentation and don't find the answer, you have to figure out the answer and then add it to the documentation. So...

I start a big project of documenting our core graphics API. It was about half-done before, with mainly the more complicated bits left, but as a side-effect this will push me to learn our graphics API better.

In doing this I find that the image we use to explain TransferMode has broken. It turns out that when I added that a few months ago, I did it by just having the Skia "fiddle" tool run a little C++ app on the fly, but since then the APIs have changed and so the app no longer works.

So I fix the app, but, additionally, to prevent the image from breaking in the future, I make a copy of it to store on our Web site so that the documentation can point to that instead.

In doing this, I find our Web site has some errors that are preventing it from uploading the image. Our Web site runs a script that analyses all the sample code and you can't update the site until the samples are fixed. This has been a great help in keeping our site up to date. Although it doesn't stop the site from becoming wrong when we change the APIs, it does let us know when we try to fix something else.

So I submit a patch to fix the sample code in the documentation for how to test a Flutter program so that it uses the new API.

In doing this, I found our Web site deployment script is using an option that no longer exists in Firebase. Turns out that Firebase was updated recently and we haven't yet updated to the new configuration.

And this is why trying to write a PaginatedDataTable widget involves editing a firebase.json file.

Pingbacks: 1 2 3 4 5 6 7 8