Skip to content

Commit bd3000a

Browse files
committed
+Update dependencies
1 parent 778e7e8 commit bd3000a

8 files changed

Lines changed: 36 additions & 64 deletions

File tree

lib/src/list_mixins/cancel_list_mixin.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import 'dart:async' show FutureOr;
1414

15-
import 'package:df_type/df_type.dart' show OperationWaiter;
15+
import 'package:df_type/df_type.dart' show Waiter;
1616
import 'package:flutter/foundation.dart' show protected;
1717

1818
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
@@ -28,7 +28,7 @@ mixin CancelListsMixin {
2828

2929
@protected
3030
FutureOr<void> cancelAll() {
31-
final operations = OperationWaiter<void>();
31+
final operations = Waiter<void>();
3232
for (final resource in _cancelList) {
3333
operations.add(() => resource.cancel());
3434
}

lib/src/list_mixins/close_list_mixin.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import 'dart:async' show FutureOr;
1414

15-
import 'package:df_type/df_type.dart' show OperationWaiter;
15+
import 'package:df_type/df_type.dart' show Waiter;
1616
import 'package:flutter/foundation.dart' show protected;
1717

1818
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
@@ -28,7 +28,7 @@ mixin CloseListsMixin {
2828

2929
@protected
3030
FutureOr<void> closeAll() {
31-
final operations = OperationWaiter<void>();
31+
final operations = Waiter<void>();
3232
for (final resource in _closeList) {
3333
operations.add(() => resource.close());
3434
}

lib/src/list_mixins/dispose_list_mixin.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import 'dart:async' show FutureOr;
1414

15-
import 'package:df_type/df_type.dart' show OperationWaiter;
15+
import 'package:df_type/df_type.dart' show Waiter;
1616
import 'package:flutter/foundation.dart' show protected;
1717

1818
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
@@ -28,7 +28,7 @@ mixin DisposeListsMixin {
2828

2929
@protected
3030
FutureOr<void> disposeAll() {
31-
final operations = OperationWaiter<void>();
31+
final operations = Waiter<void>();
3232
for (final resource in _disposeList) {
3333
operations.add(() => resource.dispose());
3434
}

lib/src/list_mixins/stop_list_mixin.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import 'dart:async' show FutureOr;
1414

15-
import 'package:df_type/df_type.dart' show OperationWaiter;
15+
import 'package:df_type/df_type.dart' show Waiter;
1616
import 'package:flutter/foundation.dart' show protected;
1717

1818
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
@@ -28,7 +28,7 @@ mixin StopListsMixin {
2828

2929
@protected
3030
FutureOr<void> stopAll() {
31-
final operations = OperationWaiter<void>();
31+
final operations = Waiter<void>();
3232
for (final resource in _stopList) {
3333
operations.add(() => resource.stop());
3434
}

lib/src/will_mixins/will_cancel/will_cancel_mixin.dart

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@
1212

1313
import 'dart:async' show FutureOr;
1414

15-
import 'package:df_type/df_type.dart' show OperationWaiter;
16-
import 'package:flutter/foundation.dart'
17-
show kDebugMode, mustCallSuper, nonVirtual;
15+
import 'package:df_type/df_type.dart' show Waiter;
16+
import 'package:flutter/foundation.dart' show kDebugMode, mustCallSuper, nonVirtual;
1817

1918
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
2019

@@ -27,8 +26,7 @@ import 'package:flutter/foundation.dart'
2726
/// invoked on each resource wrapped with [willCancel].
2827
mixin WillCancelMixin on CancelMixin {
2928
/// The list of resources marked for cancel via [willCancel].
30-
Set<_ToCancelResource<dynamic>> get toCancelResources =>
31-
Set.unmodifiable(_toCancelResources);
29+
Set<_ToCancelResource<dynamic>> get toCancelResources => Set.unmodifiable(_toCancelResources);
3230

3331
final Set<_ToCancelResource<dynamic>> _toCancelResources = {};
3432

@@ -50,15 +48,11 @@ mixin WillCancelMixin on CancelMixin {
5048
_verifyCancelMethod(resource);
5149
final disposable = (
5250
resource: resource as dynamic,
53-
onBeforeCancel: onBeforeCancel != null
54-
? (dynamic e) => onBeforeCancel(e as T)
55-
: null,
51+
onBeforeCancel: onBeforeCancel != null ? (dynamic e) => onBeforeCancel(e as T) : null,
5652
);
5753

5854
// Check for any duplicate resource.
59-
final duplicate = _toCancelResources
60-
.where((e) => e.resource == resource)
61-
.firstOrNull;
55+
final duplicate = _toCancelResources.where((e) => e.resource == resource).firstOrNull;
6256

6357
if (duplicate != null) {
6458
if (kDebugMode) {
@@ -80,7 +74,7 @@ mixin WillCancelMixin on CancelMixin {
8074
@mustCallSuper
8175
@override
8276
FutureOr<void> cancel() {
83-
final waiter = OperationWaiter<void>();
77+
final waiter = Waiter<void>();
8478
waiter.add(super.cancel);
8579
for (final disposable in _toCancelResources) {
8680
final resource = disposable.resource;
@@ -143,8 +137,7 @@ final class WillAlreadyCancelDebugError<T> extends Error {
143137
WillAlreadyCancelDebugError(this.resource);
144138

145139
@override
146-
String toString() =>
147-
'[$WillAlreadyCancelDebugError] willCancel has already '
140+
String toString() => '[$WillAlreadyCancelDebugError] willCancel has already '
148141
'been called on the resource ${resource.hashCode} and of type $T.';
149142
}
150143

lib/src/will_mixins/will_close/will_close_mixin.dart

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@
1212

1313
import 'dart:async' show FutureOr;
1414

15-
import 'package:df_type/df_type.dart' show OperationWaiter;
16-
import 'package:flutter/foundation.dart'
17-
show kDebugMode, mustCallSuper, nonVirtual;
15+
import 'package:df_type/df_type.dart' show Waiter;
16+
import 'package:flutter/foundation.dart' show kDebugMode, mustCallSuper, nonVirtual;
1817

1918
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
2019

@@ -27,8 +26,7 @@ import 'package:flutter/foundation.dart'
2726
/// invoked on each resource wrapped with [willClose].
2827
mixin WillCloseMixin on CloseMixin {
2928
/// The list of resources marked for close via [willClose].
30-
Set<_ToCloseResource<dynamic>> get toCloseResources =>
31-
Set.unmodifiable(_toCloseResources);
29+
Set<_ToCloseResource<dynamic>> get toCloseResources => Set.unmodifiable(_toCloseResources);
3230

3331
final Set<_ToCloseResource<dynamic>> _toCloseResources = {};
3432

@@ -50,15 +48,11 @@ mixin WillCloseMixin on CloseMixin {
5048
_verifyCloseMethod(resource);
5149
final disposable = (
5250
resource: resource as dynamic,
53-
onBeforeClose: onBeforeClose != null
54-
? (dynamic e) => onBeforeClose(e as T)
55-
: null,
51+
onBeforeClose: onBeforeClose != null ? (dynamic e) => onBeforeClose(e as T) : null,
5652
);
5753

5854
// Check for any duplicate resource.
59-
final duplicate = _toCloseResources
60-
.where((e) => e.resource == resource)
61-
.firstOrNull;
55+
final duplicate = _toCloseResources.where((e) => e.resource == resource).firstOrNull;
6256

6357
if (duplicate != null) {
6458
if (kDebugMode) {
@@ -80,7 +74,7 @@ mixin WillCloseMixin on CloseMixin {
8074
@mustCallSuper
8175
@override
8276
FutureOr<void> close() {
83-
final waiter = OperationWaiter<void>();
77+
final waiter = Waiter<void>();
8478
waiter.add(super.close);
8579
for (final disposable in _toCloseResources) {
8680
final resource = disposable.resource;
@@ -143,8 +137,7 @@ final class WillAlreadyCloseDebugError<T> extends Error {
143137
WillAlreadyCloseDebugError(this.resource);
144138

145139
@override
146-
String toString() =>
147-
'[$WillAlreadyCloseDebugError] willClose has already '
140+
String toString() => '[$WillAlreadyCloseDebugError] willClose has already '
148141
'been called on the resource ${resource.hashCode} and of type $T.';
149142
}
150143

lib/src/will_mixins/will_dispose/will_dispose_mixin.dart

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@
1111
//.title~
1212

1313
import 'dart:async' show FutureOr;
14-
import 'package:df_type/df_type.dart' show OperationWaiter;
15-
import 'package:flutter/foundation.dart'
16-
show kDebugMode, mustCallSuper, nonVirtual;
14+
import 'package:df_type/df_type.dart' show Waiter;
15+
import 'package:flutter/foundation.dart' show kDebugMode, mustCallSuper, nonVirtual;
1716

1817
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
1918

@@ -26,8 +25,7 @@ import 'package:flutter/foundation.dart'
2625
/// invoked on each resource wrapped with [willDispose].
2726
mixin WillDisposeMixin on DisposeMixin {
2827
/// The list of resources marked for dispose via [willDispose].
29-
Set<_ToDisposeResource<dynamic>> get toDisposeResources =>
30-
Set.unmodifiable(_toDisposeResources);
28+
Set<_ToDisposeResource<dynamic>> get toDisposeResources => Set.unmodifiable(_toDisposeResources);
3129

3230
final Set<_ToDisposeResource<dynamic>> _toDisposeResources = {};
3331

@@ -49,15 +47,11 @@ mixin WillDisposeMixin on DisposeMixin {
4947
_verifyDisposeMethod(resource);
5048
final disposable = (
5149
resource: resource as dynamic,
52-
onBeforeDispose: onBeforeDispose != null
53-
? (dynamic e) => onBeforeDispose(e as T)
54-
: null,
50+
onBeforeDispose: onBeforeDispose != null ? (dynamic e) => onBeforeDispose(e as T) : null,
5551
);
5652

5753
// Check for any duplicate resource.
58-
final duplicate = _toDisposeResources
59-
.where((e) => e.resource == resource)
60-
.firstOrNull;
54+
final duplicate = _toDisposeResources.where((e) => e.resource == resource).firstOrNull;
6155

6256
if (duplicate != null) {
6357
if (kDebugMode) {
@@ -79,7 +73,7 @@ mixin WillDisposeMixin on DisposeMixin {
7973
@mustCallSuper
8074
@override
8175
FutureOr<void> dispose() {
82-
final waiter = OperationWaiter<void>();
76+
final waiter = Waiter<void>();
8377
waiter.add(super.dispose);
8478
for (final disposable in _toDisposeResources) {
8579
final resource = disposable.resource;
@@ -142,8 +136,7 @@ final class WillAlreadyDisposeDebugError<T> extends Error {
142136
WillAlreadyDisposeDebugError(this.resource);
143137

144138
@override
145-
String toString() =>
146-
'[$WillAlreadyDisposeDebugError] willDispose has already '
139+
String toString() => '[$WillAlreadyDisposeDebugError] willDispose has already '
147140
'been called on the resource ${resource.hashCode} and of type $T.';
148141
}
149142

lib/src/will_mixins/will_stop/will_stop_mixin.dart

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@
1111
//.title~
1212

1313
import 'dart:async' show FutureOr;
14-
import 'package:df_type/df_type.dart' show OperationWaiter;
15-
import 'package:flutter/foundation.dart'
16-
show kDebugMode, mustCallSuper, nonVirtual;
14+
import 'package:df_type/df_type.dart' show Waiter;
15+
import 'package:flutter/foundation.dart' show kDebugMode, mustCallSuper, nonVirtual;
1716

1817
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
1918

@@ -26,8 +25,7 @@ import 'package:flutter/foundation.dart'
2625
/// invoked on each resource wrapped with [willStop].
2726
mixin WillStopMixin on StopMixin {
2827
/// The list of resources marked for stop via [willStop].
29-
Set<_ToStopResource<dynamic>> get toStopResources =>
30-
Set.unmodifiable(_toStopResources);
28+
Set<_ToStopResource<dynamic>> get toStopResources => Set.unmodifiable(_toStopResources);
3129

3230
final Set<_ToStopResource<dynamic>> _toStopResources = {};
3331

@@ -49,15 +47,11 @@ mixin WillStopMixin on StopMixin {
4947
_verifyStopMethod(resource);
5048
final disposable = (
5149
resource: resource as dynamic,
52-
onBeforeStop: onBeforeStop != null
53-
? (dynamic e) => onBeforeStop(e as T)
54-
: null,
50+
onBeforeStop: onBeforeStop != null ? (dynamic e) => onBeforeStop(e as T) : null,
5551
);
5652

5753
// Check for any duplicate resource.
58-
final duplicate = _toStopResources
59-
.where((e) => e.resource == resource)
60-
.firstOrNull;
54+
final duplicate = _toStopResources.where((e) => e.resource == resource).firstOrNull;
6155

6256
if (duplicate != null) {
6357
if (kDebugMode) {
@@ -79,7 +73,7 @@ mixin WillStopMixin on StopMixin {
7973
@mustCallSuper
8074
@override
8175
FutureOr<void> stop() {
82-
final waiter = OperationWaiter<void>();
76+
final waiter = Waiter<void>();
8377
waiter.add(super.stop);
8478
for (final disposable in _toStopResources) {
8579
final resource = disposable.resource;
@@ -142,8 +136,7 @@ final class WillAlreadyStopDebugError<T> extends Error {
142136
WillAlreadyStopDebugError(this.resource);
143137

144138
@override
145-
String toString() =>
146-
'[$WillAlreadyStopDebugError] willStop has already '
139+
String toString() => '[$WillAlreadyStopDebugError] willStop has already '
147140
'been called on the resource ${resource.hashCode} and of type $T.';
148141
}
149142

0 commit comments

Comments
 (0)