The widget build method: DOs and DON'Ts

The widget build method can potentially be called in every frame and should not have any side effects. https://codewithandrea.com/tips/widget-build-method-do-dont/

Disposing Fields to Avoid Memory Leaks

Forgetting to dispose controllers in your State class can lead to memory leaks, and the "dispose-fields" rule from DCM can warn you about it. https://codewithandrea.com/tips/dispose-to-avoid-memory-leaks/

June 2024: New Flutter Playlist, iOS Home Widgets, When your Backend is Not Ready, Custom Matchers

Also included: automate Flutter Deployments with Fastlane and GitHub Actions, common mistakes with images in Flutter, ARB Translate package, and more. https://codewithandrea.com/newsletter/june-2024/

Flutter: Find Unused Dart Files (VSCode Extension)

With this VSCode extension, you can remove all the unused assets, files, and dependencies in your Flutter project and decrease your app bundle size. https://codewithandrea.com/tips/find-unused-dart-files/

Conditional Imports for Web/Native APIs

If you try to access a web-specific API on native platforms, your app will crash. Here's how to use conditional imports to solve this problem. https://codewithandrea.com/tips/dart-conditional-imports/

How to use defaultTargetPlatform and kIsWeb

To detect the current platform, check for kIsWeb beforehand and use it together with defaultTargetPlatform, which doesn't import dart:io. https://codewithandrea.com/tips/default-target-platform/

The Universal Platform Package

With the Universal Platform package, you can perform platform detection with a unified syntax on all platforms, including web, without errors. https://codewithandrea.com/tips/universal-platform-package/

Taking Screenshots with the Flutter CLI

How to use the Flutter CLI to save screenshots from connected iOS and Android emulators https://codewithandrea.com/tips/flutter-screenshot/

Useful Aliases for Flutter App Development

A collection of useful aliases to speed up your Flutter app development workflow. https://codewithandrea.com/tips/useful-aliases-flutter-dev/

Prefer const over final over var

Const is for hardcoded, compile-time constants. Final is for read-only variables that are set just once. Var is for variables that are set more than once. https://codewithandrea.com/tips/const-vs-final-vs-var/


Tagok



Keresés