David Sent 💙 (@DavidSentDev) profile picture
Germany
Joined July 2022
Photo by David Sent 💙 (@DavidSentDev)Photo by David Sent 💙 (@DavidSentDev)
crashlytics: "Null check operator used on null value" code: has no null check operators 😂
16
44
3,544
Had this recently as well. In my case, the culprit was a non-null double value that turned out to be double.nan.
1
27
coding riddle, fam
5
1
11
2,584
that was my first thought but it didn't work as expected
2
220
You can even keep the height of the second container. Setting the crossAxisAlignment to stretch does the trick.
67
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…
8
7
2
40
2,902
One of the main reasons why code generation is slow your projects is: Your generated files import too many things.
11
6
2
112
18,654
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
Is code generation in your packages still going to be a thing with macros coming in Dart?
41
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
13
7
95
26,450
Let's not overlook the convenience of methods tied to objects. What about a hybrid approach? Implement methods that internally call pure functions. This way, we get the ease of object-oriented programming and maintain the flexibility of standalone function 🤔
3
170
me realizing late in this project that you don't have to make collections in Firestore for everything 😂
13
2
28
7,804
The 1 megabyte is your limit
1
1
163
After spending 7 months building up the startup, it finally has a landing page.
5
1
51
5,595
What Framework did you use for this?
1
1
102
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
4
1
37
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
Agreed. I didn't mean to argue against widgets testing, I was arguing for both widget and unit testing, at least if your logic is a component built for reuse.
1
VScode tip for folks using code-generation: You can create a custom code snippet to write the "part 'file.g.dart';" for you:
7
18
130
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
I've just learned about @/internal and my mind is blown
7
9
1
110
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
3
1
42
Is this like the visibility modifiers from languages like Java? If so, are there more?
🌍 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
Do you know if there's gonna be built-in Firestore support for location-based queries anytime soon?
1
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
29
30
125
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
Sure. Run `flutter create sample` and open the sample project in VsCode. Create folders `a` and `b` inside `lib`. Move `lib/main.dart` to `lib/b/main.dart`. Now move the folder `b` into folder `a`. See `uri_does_not_exist` error in `test/widget_test.dart`.
1
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