Singletons in Flutter: How to Avoid Them and What to do Instead

An introduction to singletons in Flutter: what problems they solve, what other ones they introduce, and what are their alternatives. https://codewithandrea.com/articles/flutter-singletons/

Flutter App Architecture: The Application Layer

Service classes are the ideal place to store logic that depends on multiple data sources or repositories. Let's explore them by building a shopping cart feature. https://codewithandrea.com/articles/flutter-app-architecture-application-layer/

The Beginner's Guide to Asking Coding Questions Online

Asking questions and receiving answers is a two-way street. Here's what to do when you need to ask a technical coding question. https://codewithandrea.com/articles/beginners-guide-coding-questions/

How to Create DartPad Examples from GitHub Gists

DartPad makes it easy to share your Dart & Flutter samples using GitHub gists, and you can even embed them on your website. Here's how. https://codewithandrea.com/tips/create-dartpad-from-github-gist/

How to Add a Custom Test Timeout in Flutter

When a test waits for a stream value that is never emitted, it will timeout after 30 seconds (by default). Here's how to make it fail fast with a custom timeout. https://codewithandrea.com/tips/custom-test-timeout-flutter/

How to Write Tests using Stream Matchers and Predicates in Flutter

The Flutter testing APIs offer some powerful stream matchers and predicates that we can use to verify state changes over time. Let's see how to use them in practice. https://codewithandrea.com/articles/async-tests-streams-flutter/

How to Use Super Initializers in Dart 2.17

Since Dart 2.17, you can initialize parameters of the super class with a new shorthand syntax. Here's how. https://codewithandrea.com/tips/dart-2.17-super-initializers/

How to Use Enhanced Enums with Members in Dart 2.17

Since Dart 2.17, we can add members and additional methods when declaring an enum. Here's how. https://codewithandrea.com/tips/enums-with-members-dart-2.17/

How to Use Super Arguments in Dart 2.17

Since Dart 2.17, you can pass arguments to the super class with a new shorthand syntax. Here's how. https://codewithandrea.com/tips/dart-2.17-super-arguments/

How to test functions that throw in Flutter

When writing tests for functions that throw, we should not invoke them directly, but rather pass them as arguments using a tear-off. https://codewithandrea.com/tips/flutter-test-expect-tear-off/


Membri



Ricerca