firebase_crud
firebase_crud copied to clipboard
code seems broken on latest flutter
dear Johannes, there is a bug in the code according to latest Flutter with the transformer:


I thought this was just a VSCode fluke, but that code fails to compile with that.
Can you suggest a fix?
Doctor output:
[✓] Flutter (Channel stable, 3.3.10, on macOS 13.1 22C65 darwin-x64, locale en-IL)
• Flutter version 3.3.10 on channel stable at /Users/sivan/FlutterInstall2/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 135454af32 (6 weeks ago), 2022-12-15 07:36:55 -0800
• Engine revision 3316dd8728
• Dart version 2.18.6
• DevTools version 2.15.0
[✗] Android toolchain - develop for Android devices
✗ Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).
If the Android SDK has been installed to a custom location, please use
`flutter config --android-sdk` to update to that location.
[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 14C18
• CocoaPods version 1.11.3
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[!] Android Studio (not installed)
• Android Studio not found; download from https://developer.android.com/studio/index.html
(or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).
[✓] VS Code (version 1.74.3)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.56.0
[✓] Connected device (2 available)
• macOS (desktop) • macos • darwin-x64 • macOS 13.1 22C65 darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 109.0.5414.87
[✓] HTTP Host Availability
• All required HTTP hosts are available
Also, it seems documentation is poor when it comes transformers, if you could either link your tube about it or provide explanation here it would be rad :) Thank you for your nice tutorial!
A quick fix might be to write
final snaps = data.docs.map<Map<String,dynamic>>((doc) => doc.data()).toList();
Still gives this:
Could you perhaps paste the link to your youtube video about transformers perhaps in your very condensed closure style? prevalent documentation is very basic and does not at all discuss such advanced use cases..