Ilya Yanok
Ilya Yanok
Could be a wrapper function instead. ```dart MockSpec getxMockSpec() => MockSpec(fallbackGenerators: {#onStart: generator}); ``` (and I really hope we'll be able to get rid of fallback generators in the next...
@JulianBissekkou Hey, sorry, it's been a while. Would you still be interested to implement it? Regarding the API, I would prefer to **not** follow Java's Mockito here and keep the...
> A few month ago I tried implementing this feature but I was stuck when calling the actual method of the spy if the user didn't register a handler for...
I can reproduce with just ```dart class X { void m({bool b = kIsWeb}) { print(b); } } ``` (`package:auto_route` uses `!kIsWeb` as a default value, but just `kIsWeb` is...
Corr: it's not just `bool.fromEnvironment` but specifically `bool.fromEnvironment('dart.library.js_util')` that results in `bool (-unknown-)` value. As a quick fix we could probably detect this and try just referencing the constant instead....
@dustincatap For you one possible fix will be to wrap `RootStackRouter` in a class of your own (making sure you don't have `kIsWeb` as an argument default value) and mock...
The problem is that both `'package:flutter/material.dart'` and `'package:flutter/cupertino.dart'` export `'package:flutter/widgets.dart'`, so the contents of the latter is kinda imported twice, and I guess Mockito's codegen randomly picks one at runtime,...
I didn't debug it, but I'd try changing https://github.com/dart-lang/mockito/blob/cca4858ad0f1e3930ebdcc6faf4a918616cca48c/lib/src/builder.dart#L151 to use `SplayTreeSet` instead and see if it helps.
Hm... right, I think the reason is conditional export... but a bit surprised we even followed the import/export chain, I'd expect it to always stop at `'package:cross_file/cross_file.dart'`.
Yes, that would be nice and I already had this improvement in my head. But that's a low priority for us currently. Contributions are welcome. The idea how to implement...