Easy ways to improve your Dart & Flutter code. Published weekly. https://codewithandrea.com/tips/dart-flutter-easy-wins-36-42/
Login to add comment
Other posts in this group
If you use build_runner and your generated Dart files are added to Git, you can hide them by default in your PRs and diffs. Here's how. https://codewithandrea.com/tips/hide-generated-files-with-gitatt
Some helper widgets for creating Flutter layouts that grow horizontally up to a given width, then remain fixed at that width. https://codewithandrea.com/tips/responsive-center-layout/
You can run a widget test multiple times with the variant argument. Very useful for golden image tests for different screen sizes. https://codewithandrea.com/tips/run-multiple-test-variants/
Ever wanted to filter tests so you only run the ones you need to? This can be easily done using test tags. https://codewithandrea.com/tips/unit-widget-test-tags-flutter/
An extensive guide covering the code generation mechanism in Dart, useful code-generating packages, and tips for efficient codebase maintenance. https://codewithandrea.com/articles/dart-flutter-code-g
When writing test expectations for functions that throw, we need a bit careful. To avoid surprises, always pass a closure inside the expect method. https://codewithandrea.com/tips/testing-functions-th
Also included in this edition: UI Testing with Maestro, Flutter Custom Carousel, codegen with GenQ, Shorebird 1.0, and the latest from Code with Andrea. https://codewithandrea.com/newsletter/april-202