chore: Avoid unnecessary lambdas
This commit is contained in:
parent
5283d0fcc8
commit
a0a03941c2
13 changed files with 19 additions and 32 deletions
|
|
@ -35,7 +35,7 @@ extension StreamExtension on Stream {
|
|||
};
|
||||
final subscription = listen(
|
||||
(_) => onMessage?.call(),
|
||||
onDone: () => controller.close(),
|
||||
onDone: controller.close,
|
||||
onError: (e, s) => controller.addError(e, s),
|
||||
);
|
||||
// add proper cleanup to the subscription and the controller, to not memory leak
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue