Skip to content

Commit

Permalink
v1.1.0
Browse files Browse the repository at this point in the history
- sdk: '>=3.3.0 <4.0.0'

- intl: ^0.19.0
- collection: ^1.18.0
- data_serializer: ^1.1.0

- lints: ^3.0.0
- test: ^1.25.2
- coverage: ^1.7.2
  • Loading branch information
gmpassos committed Feb 15, 2024
1 parent b289df3 commit b344869
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 26 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
## 3.2.0

- sdk: '>=3.3.0 <4.0.0'

- intl: ^0.19.0
- lints: ^3.0.0
- test: ^1.25.2
- dependency_validator: ^3.2.3
- collection: ^1.18.0
- coverage: ^1.7.2

## 3.1.6

- MimeType: fix charset for `text/html` type.
Expand Down
3 changes: 3 additions & 0 deletions lib/src/data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,9 @@ class MimeType {
/// Returns [true] if this is `image/png`.
bool get isImagePNG => isImage && subType == 'png';

/// Returns [true] if this is `image/png`.
bool get isImageWebP => isImage && subType == 'webp';

/// Returns [true] if this is `image/svg+xml`.
bool get isImageSVG => isImage && subType == 'svg';

Expand Down
4 changes: 2 additions & 2 deletions lib/src/events.dart
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ class EventStreamDelegator<T> implements EventStream<T> {
EventStream<T>? get eventStream {
if (_eventStream == null) {
_eventStream =
_eventStreamProvider != null ? _eventStreamProvider!() : null;
_eventStreamProvider != null ? _eventStreamProvider() : null;
if (_eventStream != null) {
flush();
}
Expand Down Expand Up @@ -817,7 +817,7 @@ class EventStreamDelegator<T> implements EventStream<T> {
eventStream?.eventValidator = eventValidator;
}

class _StreamSubscriptionProvider<T> extends StreamSubscription<T> {
class _StreamSubscriptionProvider<T> implements StreamSubscription<T> {
final StreamSubscription<T>? Function() _provider;
StreamSubscription<T>? _s;

Expand Down
6 changes: 3 additions & 3 deletions lib/src/paging.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ abstract class JSONPaging extends MapDelegate<String, dynamic> {
return null;
}

JSONPaging(Map<String, dynamic> json) : super(json);
JSONPaging(super.json);

Map<String, dynamic> get json => mainMap;

Expand Down Expand Up @@ -167,7 +167,7 @@ class ColossusPaging extends JSONPaging {
return false;
}

ColossusPaging(Map<String, dynamic> json) : super(json);
ColossusPaging(super.json);

@override
int get currentPage => json['PAGE'];
Expand Down Expand Up @@ -246,7 +246,7 @@ class SpringBootPaging extends JSONPaging {
return false;
}

SpringBootPaging(Map<String, dynamic> json) : super(json);
SpringBootPaging(super.json);

@override
int get currentPage => json['pageable']['pageNumber'];
Expand Down
6 changes: 3 additions & 3 deletions lib/src/utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ class Parameter<A> {
class Parameters2<A, B> extends Parameter<A> {
final B b;

Parameters2(A a, this.b) : super(a);
Parameters2(super.a, this.b);

@override
Parameters2<A?, B?> copy() => Parameters2(deepCopy(a), deepCopy(b));
Expand Down Expand Up @@ -216,7 +216,7 @@ class Parameters2<A, B> extends Parameter<A> {
class Parameters3<A, B, C> extends Parameters2<A, B> {
final C c;

Parameters3(A a, B b, this.c) : super(a, b);
Parameters3(super.a, super.b, this.c);

@override
Parameters3<A?, B?, C?> copy() =>
Expand Down Expand Up @@ -246,7 +246,7 @@ class Parameters3<A, B, C> extends Parameters2<A, B> {
class Parameters4<A, B, C, D> extends Parameters3<A, B, C> {
final D d;

Parameters4(A a, B b, C c, this.d) : super(a, b, c);
Parameters4(super.a, super.b, super.c, this.d);

@override
Parameters4<A?, B?, C?, D?> copy() =>
Expand Down
16 changes: 8 additions & 8 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
name: swiss_knife
description: Dart Useful Tools - collections, math, date, uri, json, events, resources, regexp, etc...
version: 3.1.6
version: 3.2.0
homepage: https://github.com/gmpassos/swiss_knife

environment:
sdk: '>=2.18.0 <4.0.0'
sdk: '>=3.3.0 <4.0.0'

dependencies:
intl: ^0.18.1
intl: ^0.19.0
resource_portable: ^3.1.0

dev_dependencies:
lints: ^2.0.1
test: ^1.22.1
dependency_validator: ^3.2.2
collection: ^1.17.0
coverage: ^1.6.3
lints: ^3.0.0
test: ^1.25.2
dependency_validator: ^3.2.3
collection: ^1.18.0
coverage: ^1.7.2

#dependency_overrides:
# resource_portable:
Expand Down
16 changes: 6 additions & 10 deletions test/swiss_knife_tree_reference_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,12 @@ class MyNode {

class MyTree extends TreeReferenceMap<MyNode, String> {
MyTree(
root, {
bool autoPurge = false,
bool keepPurgedKeys = false,
Duration? purgedEntriesTimeout,
int? maxPurgedEntries,
}) : super(root,
autoPurge: autoPurge,
keepPurgedKeys: keepPurgedKeys,
purgedEntriesTimeout: purgedEntriesTimeout,
maxPurgedEntries: maxPurgedEntries);
super.root, {
super.autoPurge,
super.keepPurgedKeys,
super.purgedEntriesTimeout,
super.maxPurgedEntries,
});

@override
MyNode? getParentOf(MyNode? key) => key?.parent;
Expand Down

0 comments on commit b344869

Please sign in to comment.