crashlytics: "Null check operator used on null value"
code: has no null check operators 😂
16
44
3,544
Flutter theme mystery: Inside a Theme widget, the first Text ignores the theme, but the second works when explicitly using Theme.of(context). Why this inconsistency in theme inheritance? 🤔 #FlutterDev
dartpad.dev/?id=67af5a6be519…
1
16
🔥Multiple inequalities 💥
Firestore queries can now contain range&inequality conditions on multiple fields.
This allows for queries that were previously impossible without workarounds.
This also affects query performance&query cost.
This&more in 4m
youtu.be/eTArV4Z3Caw?si=dOvo…
One of the main reasons why code generation is slow your projects is:
Your generated files import too many things.
One fix is to split large files imported everywhere into smaller chunks.
Ideally a generated file should not be recomputed unless its content should change.
4
16
4,163
Why I prefer top level functions over methods...
Tying a method to the state of a class makes it harder to break it out later
Pure functions are usually more portable. They don't get stuck in one place like methods
me realizing late in this project that you don't have to make collections in Firestore for everything 😂
We have a #flutter app that is 100% covered with mostly #widgettests. We don't unit test things like #bloc. We verify logic via the UI. I just did a huge refactor and didn't have to change a single test. That's a huge vindication for widget tests over #unittests
Even still, if you haven't widget tested your reusable widgets, they're not tested.
Your reusable widgets need to appear in at least one realistic scenario. Also, if you don't widget test, you can't do goldens.
1
VScode tip for folks using code-generation:
You can create a custom code snippet to write the "part 'file.g.dart';" for you:
I created this snippet that adds boilerplate for fromJson/toJson and custom methods. Then I just remove what is not needed.
gist.github.com/sentd94/e839…
1
It's an annotation that can be placed on anything to signify "Don't use this outside of the package that defined it".
It's very helpful for package authors, to make sure internal APIs don't leak
🌍 GeoFire 🔥
🤖 GeoFire for Android now works with AndroidX, so you no longer need a Jetifier dependency.
🕸 GeoFire for JavaScript now works with the v9 API, so you can build smaller geo-apps
This&more in 4m👇
youtube.com/watch?v=gD8iF0Ji…
1
3
I wonder whether my next talk should be a live coding session or not.
Part of me thinks it'd be cool. Part of me believes this is a terrible idea
9
76
A sentiment from #Flutter devs is that our IDE tooling needs improvements, especially around refactoring. Please help us prioritize the right work by sharing:
1. What refactoring scenarios your IDE imperfectly handles
2. Your IDE
3. Any analysis/linting extensions you're using
Can you easily construct an example project that reproduces imports being broken? I fixed some of these a while back but sounds like there may be others
2
Replying to @craig_labenz
1. When typing `AppLocalizations.of(context)...` using gen_l10n, the Quick Fix option won't show the auto import for 'package:flutter_gen/gen_l10n/app_localizations.dart'. Pretty annoying that you have to c&p this manually.
2. VSCode
3. Flutter Lint
1
2


















