Skip to content

Commit bdf6d99

Browse files
author
github-actions
committed
Prepare version 0.4.3
1 parent 9ac03a1 commit bdf6d99

5 files changed

Lines changed: 65 additions & 23 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## [0.4.3]
4+
5+
- Released @ 6/2025 (UTC)
6+
- chore: Upade dependencies
7+
38
## [0.4.1]
49

510
- Released @ 2/2025 (UTC)

lib/src/will_mixins/will_cancel/will_cancel_mixin.dart

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
import 'dart:async' show FutureOr;
1414

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

1819
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
1920

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

3133
final Set<_ToCancelResource<dynamic>> _toCancelResources = {};
3234

@@ -48,11 +50,15 @@ mixin WillCancelMixin on CancelMixin {
4850
_verifyCancelMethod(resource);
4951
final disposable = (
5052
resource: resource as dynamic,
51-
onBeforeCancel: onBeforeCancel != null ? (dynamic e) => onBeforeCancel(e as T) : null,
53+
onBeforeCancel: onBeforeCancel != null
54+
? (dynamic e) => onBeforeCancel(e as T)
55+
: null,
5256
);
5357

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

5763
if (duplicate != null) {
5864
if (kDebugMode) {
@@ -137,7 +143,8 @@ final class WillAlreadyCancelDebugError<T> extends Error {
137143
WillAlreadyCancelDebugError(this.resource);
138144

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

@@ -151,7 +158,10 @@ mixin CancelMixin {
151158

152159
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
153160

154-
typedef _ToCancelResource<T> = ({T resource, _OnBeforeCallback<T>? onBeforeCancel});
161+
typedef _ToCancelResource<T> = ({
162+
T resource,
163+
_OnBeforeCallback<T>? onBeforeCancel,
164+
});
155165

156166
typedef _FutureOrCallback<T> = FutureOr<void> Function();
157167
typedef _OnBeforeCallback<T> = FutureOr<void> Function(T resource);

lib/src/will_mixins/will_close/will_close_mixin.dart

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
import 'dart:async' show FutureOr;
1414

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

1819
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
1920

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

3133
final Set<_ToCloseResource<dynamic>> _toCloseResources = {};
3234

@@ -48,11 +50,15 @@ mixin WillCloseMixin on CloseMixin {
4850
_verifyCloseMethod(resource);
4951
final disposable = (
5052
resource: resource as dynamic,
51-
onBeforeClose: onBeforeClose != null ? (dynamic e) => onBeforeClose(e as T) : null,
53+
onBeforeClose: onBeforeClose != null
54+
? (dynamic e) => onBeforeClose(e as T)
55+
: null,
5256
);
5357

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

5763
if (duplicate != null) {
5864
if (kDebugMode) {
@@ -137,7 +143,8 @@ final class WillAlreadyCloseDebugError<T> extends Error {
137143
WillAlreadyCloseDebugError(this.resource);
138144

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

@@ -151,7 +158,10 @@ mixin CloseMixin {
151158

152159
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
153160

154-
typedef _ToCloseResource<T> = ({T resource, _OnBeforeCallback<T>? onBeforeClose});
161+
typedef _ToCloseResource<T> = ({
162+
T resource,
163+
_OnBeforeCallback<T>? onBeforeClose,
164+
});
155165

156166
typedef _FutureOrCallback<T> = FutureOr<void> Function();
157167
typedef _OnBeforeCallback<T> = FutureOr<void> Function(T resource);

lib/src/will_mixins/will_dispose/will_dispose_mixin.dart

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

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

1718
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
1819

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

3032
final Set<_ToDisposeResource<dynamic>> _toDisposeResources = {};
3133

@@ -47,11 +49,15 @@ mixin WillDisposeMixin on DisposeMixin {
4749
_verifyDisposeMethod(resource);
4850
final disposable = (
4951
resource: resource as dynamic,
50-
onBeforeDispose: onBeforeDispose != null ? (dynamic e) => onBeforeDispose(e as T) : null,
52+
onBeforeDispose: onBeforeDispose != null
53+
? (dynamic e) => onBeforeDispose(e as T)
54+
: null,
5155
);
5256

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

5662
if (duplicate != null) {
5763
if (kDebugMode) {
@@ -136,7 +142,8 @@ final class WillAlreadyDisposeDebugError<T> extends Error {
136142
WillAlreadyDisposeDebugError(this.resource);
137143

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

@@ -150,7 +157,10 @@ mixin DisposeMixin {
150157

151158
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
152159

153-
typedef _ToDisposeResource<T> = ({T resource, _OnBeforeCallback<T>? onBeforeDispose});
160+
typedef _ToDisposeResource<T> = ({
161+
T resource,
162+
_OnBeforeCallback<T>? onBeforeDispose,
163+
});
154164

155165
typedef _FutureOrCallback<T> = FutureOr<void> Function();
156166
typedef _OnBeforeCallback<T> = FutureOr<void> Function(T resource);

lib/src/will_mixins/will_stop/will_stop_mixin.dart

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

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

1718
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
1819

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

3032
final Set<_ToStopResource<dynamic>> _toStopResources = {};
3133

@@ -47,11 +49,15 @@ mixin WillStopMixin on StopMixin {
4749
_verifyStopMethod(resource);
4850
final disposable = (
4951
resource: resource as dynamic,
50-
onBeforeStop: onBeforeStop != null ? (dynamic e) => onBeforeStop(e as T) : null,
52+
onBeforeStop: onBeforeStop != null
53+
? (dynamic e) => onBeforeStop(e as T)
54+
: null,
5155
);
5256

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

5662
if (duplicate != null) {
5763
if (kDebugMode) {
@@ -136,7 +142,8 @@ final class WillAlreadyStopDebugError<T> extends Error {
136142
WillAlreadyStopDebugError(this.resource);
137143

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

0 commit comments

Comments
 (0)