Releases: vandadnp/flutter-tips-and-tricks
375 - Canonicalized Maps in Dart
Canonicalized maps in Dart are maps where for each key, you can calculate a unique value and should two keys get the same unique value, the last one always wins. Here is an example of how this can be useful => https://github.com/vandadnp/flutter-tips-and-tricks/blob/main/tipsandtricks/canonicalized-maps-in-dart/canonicalized-maps-in-dart.md
374 - Extending Functions in Flutter
If you can turn a function into a data type, then you can extend it. This example shows how helpful this can be =>
373 - Stream Timeout Between Events in Flutter
In order to make sure your stream produces an element every N-seconds, you can take advantage of this useful Stream transformer in Flutter / Dart => https://github.com/vandadnp/flutter-tips-and-tricks/blob/main/tipsandtricks/stream-timeout-between-events-in-flutter/stream-timeout-between-events-in-flutter.md
372 - Dart Object Description Using Reflection
Learn how to use reflection in Dart to fully describe any class https://github.com/vandadnp/flutter-tips-and-tricks/blob/main/tipsandtricks/dart-object-description-using-reflection/dart-object-description-using-reflection.md
371 - Unwrapping Multiple Optionals in Flutter and Dart
If you have multipel optional values which are needed for a single operation, you will need to check all of them for null and then perform your operation on them if all are non-null. Using this function you can simplify that task => https://github.com/vandadnp/flutter-tips-and-tricks/blob/main/tipsandtricks/unwrapping-multiple-optionals-in-flutter-and-dart/unwrapping-multiple-optionals-in-flutter-and-dart.md
370 - SafeList in Flutter and Dart
Dart's List leaves a lot to be desired from the default implementation. For instance if you read the first element of an empty list you get an exception. Rust and Swift have optionality baked into their lists so you receive optional values instead of exceptions. You can create your own lists in Dart though to circumvent some of these shortcomings. Here is an example => https://github.com/vandadnp/flutter-tips-and-tricks/blob/main/tipsandtricks/safelist-in-flutter-and-dart/safelist-in-flutter-and-dart.md
369 - Optional Iterable First Element in Dart
Iterable.first in Dart crashes your application if your iterable is empty. Let's remedy that with this extension => https://github.com/vandadnp/flutter-tips-and-tricks/blob/main/tipsandtricks/optional-iterable-first-element-in-dart/optional-iterable-first-element-in-dart.md
368 - Finding and Converting JSON Values in Dart
Use this extension to find a key in a JSON Map object, and should it exist AND its value be of a given type, then you can convert it to another data-type all within the same operation => https://github.com/vandadnp/flutter-tips-and-tricks/blob/main/tipsandtricks/finding-and-converting-json-values-in-dart/finding-and-converting-json-values-in-dart.md
367 - Colorful Logs in Flutter
Use this extension on Object?
in order to log any sort of value to the console and distinguish true null values from others => https://github.com/vandadnp/flutter-tips-and-tricks/blob/main/tipsandtricks/colorful-logs-in-flutter/colorful-logs-in-flutter.md
366 - Prefer Iterable in Flutter
Iterables allow lazy evaluation of collection items in Flutter and are the preferred way of iterating over otherwise-heavy collections. Here is an example why they are important to use => https://github.com/vandadnp/flutter-tips-and-tricks/blob/main/tipsandtricks/prefer-iterable-in-flutter/prefer-iterable-in-flutter.md