Closed lyquocnam closed 6 years ago
I've updated the package for Dart 2.0 and released version 1.0.0 of event_bus on pub. I think this should fix your problem but you will have to change the way you call the on
method because the API changed for 1.0.0:
events.on<AccountPhotoChangeEvent>().listen((event) {
// do something with the event.
});
flutter's dart standard is 2.0.0-dev.58.0.flutter-f981f09760
can this work ?
is see this message: Because hospital depends on event_bus >=1.0.0 which requires SDK version >=2.0.0-dev.67.0 <2.0.0, version solving failed. pub get failed (1)
Can you set dependency to 2.0.0-dev.58.0.flutter-f981f09760
comfortable with flutter please ?
@lyquocnam You could try to do this with a dependency override: https://www.dartlang.org/tools/pub/dependencies#dependency-overrides
Well, at least I thought this would be possible. It's possible for packages but I don't know if you can override the SDK dependency.
sorry but still not work, i think you should change the minium version of dart requirement to 2.0.0-dev.58.0.flutter-f981f09760
is better
I've lowered the dependency to 2.0.0-dev.58.0
can you confirm that this is working now?
ya it work like a charm, thanks author so much !
i have code like this:
if i try register event like this:
and error
The argument type '(AccountPhotoChangeEvent) → Null' can't be assigned to the parameter type '(dynamic) → void'.