Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 07 18:54
    @timsneath banned @hpoit
Emmanuel Belair
@e-belair
This can work : print(reactions.firstWhere((reaction) => reaction.isNotEmpty, orElse: () => []).firstWhere((item) => item.name != 'test', orElse: () => null));
Kirk Charles P. Niverba
@kirkcharlesniv
Thank you so much
Emmanuel Belair
@e-belair
I have to go, brb in an hour
no problem!
iu4u57k3
@iu4u57k3
hello, can we bind a keyboard shortcut key to jump to next or previous analysis issue in Webstorm or VS Code? This will speed up refactoring by a lot.
Emmanuel Belair
@e-belair
@iu4u57k3 On my Webstorm, F12 jump to the last Tool window
iu4u57k3
@iu4u57k3
@e-belair Thanks, that solves the issue!
Emmanuel Belair
@e-belair
You can also configure a custom shortcut for opening it
iu4u57k3
@iu4u57k3
:thumbsup: Thanks!
Emmanuel Belair
@e-belair
yw
Adib Mohsin
@pacifio
I am using scoped model for state management ... I am using this thing to toggle themes and I am also using shared_preferences for storing current theme value
but it's not working
how can i use scoped model with shared_preferences ?
thanks in advance :)
Matias Meno
@enyo
I have upgrade to dart 2.5 and since then when I invoke pub run build_runner test -- test -p chrome it simply hangs on all the systems I have tested
Has something changed in that regard?
Emmanuel Belair
@e-belair
@enyo I've upgraded too and didn't get this behavior
Did you run pub get ?
Then did you try deleting .dart_tool, then re-run your command?
Matias Meno
@enyo
@e-belair yes all of it
I have the same behaviour on my two development machines as well as my CI test runner
Emmanuel Belair
@e-belair
That's really strange
Matias Meno
@enyo
Ah! My grind script hid the exception!
There's a failed test that seems to cause the hanging and I didn't see any output from it. That seems to be the reason
Emmanuel Belair
@e-belair
Seems like you're on the good way!
Matias Meno
@enyo
Mh.. although I'm not sure it's actually a problem with our code..
00:01 +0 -1: compiling test/utils/price_test.dart [E]
  type '_WebSocketProtocolTransformer' is not a subtype of type 'StreamTransformer<Uint8List, dynamic>' of 'streamTransformer'
Matias Meno
@enyo
I'm upgrading all dependencies. That's a good candidate :)
Emmanuel Belair
@e-belair
Sounds good
Charles Christolini
@binarypie
Is there an example implementation of using Bazel with Dart? We are looking at it for our Go backend but would like to keep things consistent.
Jacob MacDonald
@jakemac53
No, we tried to export our internal rules for a while but ultimately we decided not to invest in it further. We ran into a lot of problems relating to windows support primarily.
That project could get revived at some point but there is nothing in the works right now
You could look there for inspiration if you are interested, https://github.com/dart-archive/rules_dart https://github.com/dart-archive/bazel
it is all very out of date though - it uses analyzer summaries still for JS compilation which will be deprecated soon and won't get any new language features
Charles Christolini
@binarypie
@jakemac53 thanks that was the feeling I got when I read through those last night. We'll just do something else for now and possibly circle back later
Navid
@navidshad
@isoos I have used IndexedDB but it has a problem, when a record will be removed, free space of available storage doesn't increase mediately.
I search for this problem and some people said google doesn't remove indexedDb records physically immediately.
Matias Meno
@enyo
What's the fastest way to upgrade all my dependencies to their latest versions but in a sensible way? Let's say there is a 3.4.5 version of a package I'm using, but I still have ^2.8.0 in my pubspec.yaml. I now want it to change the dependency to ^3.0.0 so it includes the latest version but isn't too specific so it won't break pub upgrade with a dependency hell. Is there a tool that can help me with that? Because doing this manually takes forever
István Soós
@isoos
@enyo: You can use '>=2.8.0 <4.0.0' as a constraint. But at major version upgrades (per semver semantic contract) you run the risk of breaking changes (2.x.y -> 3.0.0), so I don't think this should be done automatically.
Matias Meno
@enyo
@isoos yes that's why I don't want to go this route
I have multiple packages with many dependencies (20-50)
Now we haven't upgrade lots of them in a while, but I want to upgrade all of them now. Going through each one individually and looking for the latest version and adding this to the pubspec.yaml is an incredibly tedious task.
I want to upgrade them all in my pubspec.yaml, see which major versions changed, check the CHANGELOG for these versions and see if there is something that affects me, and then fix all warnings/errors I get due to the upgrade
Jacob MacDonald
@jakemac53

@enyo if you do a pub upgrade without editing any of your constraints it will list to you all the packages that have a newer version than what you were able to get due to your constraints (or those of your deps). It will also tell you what the latest version is.

That should give you a good starting point for knowing what packages you need to update constraints for.

Don
@donny-dont
https://github.com/apps/renovate has support for pub
Brady Trainor
@bradyt
Hmm, I don't remember pub run test showing the so much stack trace. Is that normal?
Hmm, no expectFailure?
Emmanuel Belair
@e-belair
@bradyt are you talking about -r expanded ?
Brady Trainor
@bradyt
Oh, it must be when I'm specifying full path to a file.
So pub run test shows errors concisely, but pub run test/format_test.dart has a stack trace.
Nate Bosch
@natebosch
you want pub run test test/format_test.dart
when you run pub run <some_file> you aren't using the test runner
Jacob MacDonald
@jakemac53
Ya it is confusing but that is just basically like running dart test/format_test.dart