From 9a5fc1827c4e74d0908767a3c87469ae8c8f136c Mon Sep 17 00:00:00 2001 From: Robert Virkus Date: Mon, 13 Feb 2023 21:00:10 +0100 Subject: [PATCH] feat: update dependencies --- analysis_options.yaml | 1 - lib/src/dom/image_transformers.dart | 3 +-- pubspec.yaml | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/analysis_options.yaml b/analysis_options.yaml index cd9e93f..b918358 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -62,7 +62,6 @@ linter: #- flutter_style_todos # Flutter todos are to verbose for our requirements. - hash_and_equals - implementation_imports - - invariant_booleans - iterable_contains_unrelated_type # - join_return_with_assignment # leads to less readable code IMHO - library_names diff --git a/lib/src/dom/image_transformers.dart b/lib/src/dom/image_transformers.dart index 5921e1b..9913dd2 100644 --- a/lib/src/dom/image_transformers.dart +++ b/lib/src/dom/image_transformers.dart @@ -1,5 +1,4 @@ import 'dart:convert'; -import 'dart:typed_data'; import 'package:enough_mail/mime.dart'; import 'package:html/dom.dart'; @@ -104,7 +103,7 @@ class ImageTransformer extends DomTransformer { if (image.width > configuration.maxImageWidth!) { final resized = img.copyResize(image, width: configuration.maxImageWidth); - final reducedBinary = img.encodePng(resized) as Uint8List; + final reducedBinary = img.encodePng(resized); // print( // 'reduced from ${binary.length} to ${reducedBinary.length} / ${reducedBinary.length / binary.length}'); binary = reducedBinary; diff --git a/pubspec.yaml b/pubspec.yaml index 10bd1a8..b1c2b50 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -9,7 +9,7 @@ environment: dependencies: enough_mail: ^2.0.0 html: ^0.15.0 - image: ^3.1.3 + image: ^4.0.13 dependency_overrides: xml: ^6.0.1