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/

Created 11mo | Apr 25, 2024, 10:30:12 AM


Login to add comment

Other posts in this group

int.fromEnvironment and bool.fromEnvironment

When reading variables from .env files, you can use int.fromEnvironment and bool.fromEnvironment to read integers and booleans. https://codewithandrea.com/tips/int-bool-from-environment/

Mar 28, 2025, 12:20:09 PM | Code with Andrea
March 2025: Hot-reload on Flutter web, Practical Architecture, Unified Riverpod Syntax

Also included: Lesser-known Dart and Flutter functionalities, latest from Code with Andrea, and some thoughts on vibe coding with AI. https://codewithandrea.com/newsletter/march-2025/

Mar 25, 2025, 12:30:03 PM | Code with Andrea
Hot Reload on Flutter web (beta)

To enable this, switch to the latest Flutter beta (3.31) and run your app with --web-experimental-hot-reload https://codewithandrea.com/tips/hot-reload-flutter-web-beta/

Mar 20, 2025, 11:50:03 AM | Code with Andrea
Uploading Screenshots with Fastlane

Instead of taking screenshots manually for each device & language, you can automate it with Maestro! Here's how. https://codewithandrea.com/tips/uploading-screenshots-fastlane/

Mar 19, 2025, 10:20:09 AM | Code with Andrea
Using Semantics Identifiers for UI Testing

Instead of taking screenshots manually for each device & language, you can automate it with Maestro! Here's how. https://codewithandrea.com/tips/semantics-identifiers-ui-testing/

Mar 18, 2025, 1:30:06 PM | Code with Andrea
Automated Screenshot Generation with Maestro

Instead of taking screenshots manually for each device & language, you can automate it with Maestro! Here's how. https://codewithandrea.com/tips/automated-screenshot-generation-maestro/

Mar 17, 2025, 6:50:08 PM | Code with Andrea
Android Demo Mode for Better Screenshots

Here's a handy command to override the Android status bar UI before taking screenshots for your Play Store listings. https://codewithandrea.com/tips/android-demo-mode-for-screenshots/

Mar 14, 2025, 2:20:12 PM | Code with Andrea