Skip to content

Commit

Permalink
Removed dependency to package:collection
Browse files Browse the repository at this point in the history
  • Loading branch information
felixblaschke committed Nov 2, 2024
1 parent 8c11e45 commit ddc1bf7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## 5.1.0

- Realigned code base with Flutter `3.24.0`
- Removed dependency to package `collection`

## 5.0.2

Expand Down
8 changes: 7 additions & 1 deletion lib/movie_tween/movie_tween.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'dart:math';

import 'package:collection/collection.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';

Expand Down Expand Up @@ -393,3 +392,10 @@ class MovieTweenProperty<T> {
/// Returns the current value of this property.
T from(Movie movie) => movie.get(this);
}

extension _SortedExtension<T> on Iterable<T> {
/// Creates a sorted list of the elements of the iterable.
///
/// The elements are ordered by the [compare] [Comparator].
List<T> sorted(Comparator<T> compare) => [...this]..sort(compare);
}
2 changes: 1 addition & 1 deletion pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ packages:
source: hosted
version: "1.1.1"
collection:
dependency: "direct main"
dependency: transitive
description:
name: collection
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
Expand Down
1 change: 0 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ dependencies:
flutter:
sdk: flutter

collection: any
dev_dependencies:
flutter_test:
sdk: flutter
Expand Down

0 comments on commit ddc1bf7

Please sign in to comment.