Testing Functions That Throw

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-that-throw/

Erstellt 27d | 25.04.2024, 10:30:12


Melden Sie sich an, um einen Kommentar hinzuzufügen

Andere Beiträge in dieser Gruppe

May 2024: Flutter 3.22, Firebase Data Connect, Wasm Updates, Dart Macros Preview

Also included in this edition: Google I/O news, new Flutter features, creating custom linter rules, how to run JavaScript in Flutter, and more. https://codewithandrea.com/newsletter/may-2024/

21.05.2024, 13:50:02 | Code with Andrea
JsonCodable (Dart Macros experiment)

How to use the JsonCodable macro to augment your classes with fromJson and toJson methods https://codewithandrea.com/tips/json-codable/

21.05.2024, 11:30:13 | Code with Andrea
Transform SVG assets at build time (Vector Graphics Compiler)

Here's how to use the Vector Graphics Compiler to precompile SVGs at build time for better rendering performance. https://codewithandrea.com/tips/vector-graphics-compiler/

21.05.2024, 11:30:12 | Code with Andrea
Flutter Web App Initialization Logic with CSS Loader

How to use the web app bootstrap process (new in Flutter 3.22) and add a CSS progress indicator before the Flutter app is ready to take over. https://codewithandrea.com/tips/flutter-web-app-initializa

21.05.2024, 11:30:12 | Code with Andrea
REST Client Extension for VSCode

How to send HTTP requests and view the response directly in Visual Studio Code. https://codewithandrea.com/tips/rest-client-vscode/

18.05.2024, 08:20:11 | Code with Andrea
Enabling Asserts in Release Mode in Dart / Flutter

By default, asserts are only enabled in Debug mode. To enable them in Release mode, run with the --enable-asserts flag. https://codewithandrea.com/tips/enable-asserts-flag/

18.05.2024, 08:20:11 | Code with Andrea
Use SizedBox.shrink() to return an empty box

If you need to return an empty widget, SizedBox.shrink() is more performant than an empty Container. https://codewithandrea.com/tips/sizedbox-shrink/

18.05.2024, 08:20:10 | Code with Andrea