{"id":2224,"date":"2018-02-26T19:49:12","date_gmt":"2018-02-27T01:49:12","guid":{"rendered":"https:\/\/www.wiredprairie.us\/blog\/?p=2224"},"modified":"2018-02-26T19:49:44","modified_gmt":"2018-02-27T01:49:44","slug":"flutter-demo-application-linking-to-boardgamegeek-coms-hot-game-list","status":"publish","type":"post","link":"https:\/\/www.wiredprairie.us\/blog\/index.php\/archives\/2224","title":{"rendered":"Flutter Demo application linking to BoardGameGeek.Com’s Hot Game List"},"content":{"rendered":"

I’ve built a slightly more interesting application using Flutter.\u00a0 Using an XML feed from BoardGameGeek’s API<\/a>, the application displays a list of the current hot games complete with thumbnail images.<\/p>\n

\"Android<\/a><\/p>\n

Here<\/a>‘s the code. I used a standard Flutter app template and also added a few packages<\/a> to the project.<\/p>\n

I’ve coded a substantial amount of Windows Presentation Foundation (WPF) and Silverlight code over the years. One of the concerns that often came up was the UI tree …, the more complex it was, the slower the app often was without lots of tricks. Using the new inspector for Flutter apps, I selected one of the images in the UI. Needless to say, there are a\u00a0few<\/strong> objects created to represent the UI tree. In fact, I had trouble capturing the image for this blog post. :)<\/p>\n


\n\"Flutter<\/a><\/p>\n

I don’t have evidence that this generally will be a performance problem. Maybe with relatively simple mobile applications, a deep rich object based UI hierarchy won’t affect performance as much as it might in a desktop application of reasonable complexity. Regardless, it’s worth considering as you build a UI.<\/p>\n

Back to what I built.\u00a0When a user taps on a board game in the list, I’ve wired the code to call the _showGameItem<\/strong> below. I appreciate that there’s an easy way to navigate to a new page on the stack and show a UI, all within a single function. Of course, I could have split it into multiple builder functions if needed.<\/p>\n