flutter-tips-and-tricks
flutter-tips-and-tricks copied to clipboard
A Collection of Flutter and Dart Tips and Tricks
As suggested at https://github.com/vandadnp/flutter-tips-and-tricks/blob/main/tipsandtricks/default-value-for-optionals-in-dart/default-value-for-optionals-in-dart.md I declared: extension OrDefault on T { T get orDefault { final value = this; if (value == null) { return { int: 0, String: '',...
In "Factory Constructors in Dart" there is no definition for "Rect".
This tip is overly complicated, you can just do `enumValue.index` : https://github.com/vandadnp/flutter-tips-and-tricks/blob/main/tipsandtricks/enum-associated-values-in-dart/enum-associated-values-in-dart.md
Using classes as enum has become obsolete since Dart 2.17, this tip could be removed ! https://github.com/vandadnp/flutter-tips-and-tricks/blob/main/tipsandtricks/classes-as-enums-in-dart/classes-as-enums-in-dart.md
This tip : https://github.com/vandadnp/flutter-tips-and-tricks/blob/main/tipsandtricks/convert-enums-to-strings-in-dart/convert-enums-to-strings-in-dart.md is out of date because we now have enumValue.name since Dart 2.15 so I think this tip can be removed 😉
RE: https://github.com/vandadnp/flutter-tips-and-tricks/blob/main/tipsandtricks/null-aware-infix-operators-in-dart/null-aware-infix-operators-in-dart.md Having: T? operator +(final T? other) { final shadow = this; if (shadow != null) { return shadow + (other ?? 0) as T; } else { return...
In this PR, we've made significant enhancements to the Table of Contents (TOC). We've distinctly separated and organized resources related to Dart, Flutter, and Riverpod. This differentiation ensures that developers...
Typo in "365 - Recoveringg Stream Errors in Flutter" Likely you planned saying "Recovering" (single G)?