Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
I think you repeated same if else.
I might be wrong or not, code completion blocks.
Check your extension func. -
RTRMS37905y@melezorus34 nope, check the casing, the api that inconsistent that they are spelt differently depending on the call.
-
Root824845yI'd negate the first function so its name is truthy, as that would make any usages a little easier to read. Like "present" or "populated" instead of "notMissing"
Other than that, it just looks like a utility function? I dont know if there's a better / more acceptable way of doing this in Dart.
Edit: algo necro 🙁 -
RTRMS37905y@Root it's less about doing it better and more about having to have done it at all, I should not have an api returning maybe a string maybe a number for the same key.
ID totally go postal if one day it randomly decides to return a double instead.
Related Rants
-
rostopira23Kotlin: I don't have ternary operator, it's bad for readability Swift: I removed ++ and --, cause they are old...
-
t4ils10>writing app >everything works >commits to gitlab >writes some extra stuff >everything breaks >why.jpeg >head_...
-
d02d33pak16Made my FIRST APP using Flutter. How's it? Fetches 'Random Rants' from devRant. Should I put the code on G...
Forgive me for I have sinned.
I feel like I need a bleach shower after having had to write these methods in my Dart codebase
rant
dart
horror stories
bad api