Lately, I have been wanting to put some of my newly acquired techniques into practice in an actual project without diluting projects for customers with experimental work. That's why I rebuilt my personal website in Flutter! You can check it out at https://www.basdevaan.nl! This website is entirely built with Flutter and will be the place where I post my blogs and playground widgets to fiddle around with. It's also a safe environment for me to try out some new techniques. 🙏
Fluid UI 0.0.2
Of course, the first thing I wanted to try out was Fluid UI in practice! For its implementation on my website, I made some minor improvements:
- Improved performance by using the new syntax MediaQuery.sizeOf(context) instead of MediaQuery.of(context).size to get the size from MediaQuery. This only rebuilds the widget when the size is adjusted, and not when something else within the MediaQuery data is adjusted.
- Improved syntax for Fluid Space Pairs. Previously, there wasn't a nice shorthand way to create a space pair, but now you can create one by adding .to to a Fluid Size. In practice, a Size Pair looks like this: