diff --git a/example/.flutter-plugins-dependencies b/example/.flutter-plugins-dependencies new file mode 100644 index 0000000..e42a038 --- /dev/null +++ b/example/.flutter-plugins-dependencies @@ -0,0 +1 @@ +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"image_picker","path":"/Users/reni/Downloads/Programas/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.4.12+1/","dependencies":[]},{"name":"path_provider","path":"/Users/reni/Downloads/Programas/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-0.4.1/","dependencies":[]}],"android":[{"name":"image_picker","path":"/Users/reni/Downloads/Programas/flutter/.pub-cache/hosted/pub.dartlang.org/image_picker-0.4.12+1/","dependencies":[]},{"name":"path_provider","path":"/Users/reni/Downloads/Programas/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-0.4.1/","dependencies":[]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"image_picker","dependencies":[]},{"name":"path_provider","dependencies":[]}],"date_created":"2021-05-01 15:40:37.479609","version":"2.1.0-12.2.pre"} \ No newline at end of file diff --git a/example/ios/Flutter/flutter_export_environment.sh b/example/ios/Flutter/flutter_export_environment.sh new file mode 100755 index 0000000..417d45f --- /dev/null +++ b/example/ios/Flutter/flutter_export_environment.sh @@ -0,0 +1,14 @@ +#!/bin/sh +# This is a generated file; do not edit or check into version control. +export "FLUTTER_ROOT=/Users/reni/Downloads/Programas/flutter" +export "FLUTTER_APPLICATION_PATH=/Users/reni/Downloads/Projetos/Flutter/libs/flutter_luban/example" +export "COCOAPODS_PARALLEL_CODE_SIGN=true" +export "FLUTTER_TARGET=lib/main.dart" +export "FLUTTER_BUILD_DIR=build" +export "SYMROOT=${SOURCE_ROOT}/../build/ios" +export "FLUTTER_BUILD_NAME=1.0.0" +export "FLUTTER_BUILD_NUMBER=1" +export "DART_OBFUSCATION=false" +export "TRACK_WIDGET_CREATION=false" +export "TREE_SHAKE_ICONS=false" +export "PACKAGE_CONFIG=.packages" diff --git a/lib/src/flutter_luban.dart b/lib/src/flutter_luban.dart index f55911d..03026bf 100644 --- a/lib/src/flutter_luban.dart +++ b/lib/src/flutter_luban.dart @@ -2,7 +2,7 @@ import 'dart:async'; import 'dart:io'; import 'dart:isolate'; import 'dart:math'; -import 'dart:typed_data'; +import 'package:flutter/foundation.dart' as Foundation; import 'package:flutter/foundation.dart'; import 'package:image/image.dart'; @@ -10,8 +10,21 @@ import 'package:image/image.dart'; class Luban { Luban._(); - static Future compressImage(CompressObject object) async { - return compute(_lubanCompress, object); + static Future?> compressImage(CompressObject object) async { + if (Foundation.kIsWeb || (object.path == null || object.path!.isEmpty)) { + return compute(_lubanCompress, object); + } else { + List? bytes = await compute(_lubanCompress, object); + if (bytes == null) { + return null; + } + File file = File(object.path!); + if (!file.existsSync()) { + file.createSync(recursive: true); + } + file.writeAsBytesSync(bytes, flush: true); + return bytes; + } } static Future compressImageQueue(CompressObject object) async { @@ -23,7 +36,7 @@ class Luban { return answer.first; } - static Future> compressImageList( + static Future?>> compressImageList( List objects) async { return compute(_lubanCompressList, objects); } @@ -38,36 +51,21 @@ class Luban { }); } - static List _lubanCompressList(List objects) { - var results = []; + static List?> _lubanCompressList(List objects) { + List?> results = []; objects.forEach((_o) { results.add(_lubanCompress(_o)); }); - return results as List; + return results; } - static bool _parseType(String path, List suffix) { - bool _result = false; - for (int i = 0; i < suffix.length; i++) { - if (path.endsWith(suffix[i])) { - _result = true; - break; - } - } - return _result; - } - - static String? _lubanCompress(CompressObject object) { - Image image = decodeImage(object.imageFile!.readAsBytesSync())!; - var length = object.imageFile!.lengthSync(); - print(object.imageFile!.path); + static List? _lubanCompress(CompressObject object) { + Image image = decodeImage(object.bytes)!; + var length = object.bytes.lengthInBytes; bool isLandscape = false; - const List jpgSuffix = ["jpg", "jpeg", "JPG", "JPEG"]; - const List pngSuffix = ["png", "PNG"]; - bool isJpg = _parseType(object.imageFile!.path, jpgSuffix); - bool isPng = false; - if (!isJpg) isPng = _parseType(object.imageFile!.path, pngSuffix); + bool isJpg = + object.imageType == ImageType.JPEG || object.imageType == ImageType.JPG; double size; int fixelW = image.width; @@ -85,26 +83,13 @@ class Luban { } else { scale = fixelW / fixelH; } - var decodedImageFile; - if (isJpg) - decodedImageFile = new File( - object.path! + '/img_${DateTime.now().millisecondsSinceEpoch}.jpg'); - else if (isPng) - decodedImageFile = new File( - object.path! + '/img_${DateTime.now().millisecondsSinceEpoch}.png'); - else - throw Exception("flutter_luban don't support this image type"); - - if (decodedImageFile.existsSync()) { - decodedImageFile.deleteSync(); - } + List bytes; var imageSize = length / 1024; if (scale <= 1 && scale > 0.5625) { if (fixelH < 1664) { if (imageSize < 150) { - decodedImageFile - .writeAsBytesSync(encodeJpg(image, quality: object.quality)); - return decodedImageFile.path; + bytes = (encodeJpg(image, quality: object.quality)); + return bytes; } size = (fixelW * fixelH) / pow(1664, 2) * 150; size = size < 60 ? 60 : size; @@ -127,9 +112,8 @@ class Luban { } } else if (scale <= 0.5625 && scale >= 0.5) { if (fixelH < 1280 && imageSize < 200) { - decodedImageFile - .writeAsBytesSync(encodeJpg(image, quality: object.quality)); - return decodedImageFile.path; + bytes = encodeJpg(image, quality: object.quality); + return bytes; } int multiple = fixelH / 1280 == 0 ? 1 : fixelH ~/ 1280; thumbW = fixelW / multiple; @@ -144,9 +128,8 @@ class Luban { size = size < 100 ? 100 : size; } if (imageSize < size) { - decodedImageFile - .writeAsBytesSync(encodeJpg(image, quality: object.quality)); - return decodedImageFile.path; + bytes = encodeJpg(image, quality: object.quality); + return bytes; } Image smallerImage; if (isLandscape) { @@ -159,22 +142,17 @@ class Luban { height: object.autoRatio ? null : thumbH.toInt()); } - if (decodedImageFile.existsSync()) { - decodedImageFile.deleteSync(); - } if (object.mode == CompressMode.LARGE2SMALL) { - _large2SmallCompressImage( + bytes = _large2SmallCompressImage( image: smallerImage, - file: decodedImageFile, quality: object.quality, targetSize: size, step: object.step, isJpg: isJpg, ); } else if (object.mode == CompressMode.SMALL2LARGE) { - _small2LargeCompressImage( + bytes = _small2LargeCompressImage( image: smallerImage, - file: decodedImageFile, quality: object.step, targetSize: size, step: object.step, @@ -182,18 +160,16 @@ class Luban { ); } else { if (imageSize < 500) { - _large2SmallCompressImage( + bytes = _large2SmallCompressImage( image: smallerImage, - file: decodedImageFile, quality: object.quality, targetSize: size, step: object.step, isJpg: isJpg, ); } else { - _small2LargeCompressImage( + bytes = _small2LargeCompressImage( image: smallerImage, - file: decodedImageFile, quality: object.step, targetSize: size, step: object.step, @@ -201,70 +177,62 @@ class Luban { ); } } - return decodedImageFile.path; + return bytes; } - static _large2SmallCompressImage({ + static List _large2SmallCompressImage({ Image? image, - File? file, quality, targetSize, step, - bool isJpg: true, + bool isJpg = true, }) { if (isJpg) { var im = encodeJpg(image!, quality: quality); var tempImageSize = Uint8List.fromList(im).lengthInBytes; if (tempImageSize / 1024 > targetSize && quality > step) { quality -= step; - _large2SmallCompressImage( + return _large2SmallCompressImage( image: image, - file: file, quality: quality, targetSize: targetSize, step: step, ); - return; } - file!.writeAsBytesSync(im); + return im; } else { - _compressPng( + return _compressPng( image: image!, - file: file, targetSize: targetSize, large2Small: true, ); } } - static _small2LargeCompressImage({ + static List _small2LargeCompressImage({ Image? image, - File? file, quality, targetSize, step, - bool isJpg: true, + bool isJpg = true, }) { if (isJpg) { var im = encodeJpg(image!, quality: quality); var tempImageSize = Uint8List.fromList(im).lengthInBytes; if (tempImageSize / 1024 < targetSize && quality <= 100) { quality += step; - _small2LargeCompressImage( + return _small2LargeCompressImage( image: image, - file: file, quality: quality, targetSize: targetSize, step: step, isJpg: isJpg, ); - return; } - file!.writeAsBytesSync(im); + return im; } else { - _compressPng( + return _compressPng( image: image!, - file: file, targetSize: targetSize, large2Small: false, ); @@ -272,9 +240,8 @@ class Luban { } ///level 1~9 level++ -> image-- - static void _compressPng({ + static List _compressPng({ required Image image, - File? file, level, targetSize, required bool large2Small, @@ -286,22 +253,20 @@ class Luban { _level = level ?? 9; } List im = encodePng(image, level: _level); - if (_level > 9 || _level < 1) { + if (_level >= 9 || _level <= 1) { } else { var tempImageSize = Uint8List.fromList(im).lengthInBytes; if (tempImageSize / 1024 > targetSize) { - _compressPng( + return _compressPng( image: image, - file: file, targetSize: targetSize, level: large2Small ? _level + 1 : _level - 1, large2Small: large2Small, ); - return; + //return; } } - - file!.writeAsBytesSync(im); + return im; } } @@ -311,22 +276,26 @@ enum CompressMode { AUTO, } +enum ImageType { JPG, JPEG, PNG } + class CompressObject { - final File? imageFile; - final String? path; + final Uint8List bytes; + final ImageType? imageType; final CompressMode mode; final int quality; final int step; + final String? path; ///If you are not sure whether the image detail property is correct, set true, otherwise the compressed ratio may be incorrect final bool autoRatio; CompressObject({ - this.imageFile, - this.path, - this.mode: CompressMode.AUTO, - this.quality: 80, - this.step: 6, + required this.bytes, + required this.imageType, + this.mode = CompressMode.AUTO, + this.quality = 80, + this.step = 6, this.autoRatio = true, + this.path, }); } diff --git a/pubspec.lock b/pubspec.lock index a3c18b9..6505154 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,417 +5,475 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - url: "https://pub.dartlang.org" + sha256: f0bb5d1648339c8308cc0b9838d8456b3cfe5c91f9dc1a735b4d003269e5da9a + url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "88.0.0" analyzer: dependency: transitive description: name: analyzer - url: "https://pub.dartlang.org" + sha256: "0b7b9c329d2879f8f05d6c05b32ee9ec025f39b077864bdb5ac9a7b63418a98f" + url: "https://pub.dev" source: hosted - version: "0.39.1" + version: "8.1.1" archive: dependency: transitive description: name: archive - url: "https://pub.dartlang.org" + sha256: "2fde1607386ab523f7a36bb3e7edb43bd58e6edaf2ffb29d8a6d578b297fdbbd" + url: "https://pub.dev" source: hosted - version: "2.0.10" + version: "4.0.7" args: dependency: transitive description: name: args - url: "https://pub.dartlang.org" + sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04 + url: "https://pub.dev" source: hosted - version: "1.5.2" + version: "2.7.0" async: dependency: transitive description: name: async - url: "https://pub.dartlang.org" + sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb" + url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.13.0" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.dartlang.org" + sha256: "5bbf32bc9e518d41ec49718e2931cd4527292c9b0c6d2dffcf7fe6b9a8a8cf72" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + characters: + dependency: transitive + description: + name: characters + sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 + url: "https://pub.dev" source: hosted - version: "1.0.5" + version: "1.4.0" charcode: dependency: transitive description: name: charcode - url: "https://pub.dartlang.org" + sha256: "8e36feea6de5ea69f2199f29cf42a450a855738c498b57c0b980e2d3cca9c362" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + cli_config: + dependency: transitive + description: + name: cli_config + sha256: ac20a183a07002b700f0c25e61b7ee46b23c309d76ab7b7640a028f18e4d99ec + url: "https://pub.dev" source: hosted - version: "1.1.2" + version: "0.2.0" collection: dependency: transitive description: name: collection - url: "https://pub.dartlang.org" + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" + url: "https://pub.dev" source: hosted - version: "1.14.11" + version: "1.19.1" convert: dependency: transitive description: name: convert - url: "https://pub.dartlang.org" + sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68 + url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "3.1.2" coverage: dependency: transitive description: name: coverage - url: "https://pub.dartlang.org" + sha256: "5da775aa218eaf2151c721b16c01c7676fbfdd99cebba2bf64e8b807a28ff94d" + url: "https://pub.dev" source: hosted - version: "0.13.3+1" + version: "1.15.0" crypto: dependency: transitive description: name: crypto - url: "https://pub.dartlang.org" + sha256: c8ea0233063ba03258fbcf2ca4d6dadfefe14f02fab57702265467a19f27fadf + url: "https://pub.dev" source: hosted - version: "2.1.3" - csslib: + version: "3.0.7" + ffi: + dependency: transitive + description: + name: ffi + sha256: "289279317b4b16eb2bb7e271abccd4bf84ec9bdcbe999e278a94b804f5630418" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + file: dependency: transitive description: - name: csslib - url: "https://pub.dartlang.org" + name: file + sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 + url: "https://pub.dev" source: hosted - version: "0.16.1" + version: "7.0.1" flutter: dependency: "direct main" description: flutter source: sdk version: "0.0.0" - front_end: + frontend_server_client: dependency: transitive description: - name: front_end - url: "https://pub.dartlang.org" + name: frontend_server_client + sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 + url: "https://pub.dev" source: hosted - version: "0.1.29" + version: "4.0.0" glob: dependency: transitive description: name: glob - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - html: - dependency: transitive - description: - name: html - url: "https://pub.dartlang.org" + sha256: c3f1ee72c96f8f78935e18aa8cecced9ab132419e8625dc187e1c2408efc20de + url: "https://pub.dev" source: hosted - version: "0.14.0+3" - http: - dependency: transitive - description: - name: http - url: "https://pub.dartlang.org" - source: hosted - version: "0.12.0+2" + version: "2.1.3" http_multi_server: dependency: transitive description: name: http_multi_server - url: "https://pub.dartlang.org" + sha256: bfb651625e251a88804ad6d596af01ea903544757906addcb2dcdf088b5ea185 + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "3.0.1" http_parser: dependency: transitive description: name: http_parser - url: "https://pub.dartlang.org" + sha256: e362d639ba3bc07d5a71faebb98cde68c05bfbcfbbb444b60b6f60bb67719185 + url: "https://pub.dev" source: hosted - version: "3.1.3" + version: "4.0.0" image: dependency: "direct main" description: name: image - url: "https://pub.dartlang.org" + sha256: "4e973fcf4caae1a4be2fa0a13157aa38a8f9cb049db6529aa00b4d71abc4d928" + url: "https://pub.dev" source: hosted - version: "2.1.9" + version: "4.5.4" io: dependency: transitive description: name: io - url: "https://pub.dartlang.org" + sha256: "15a5436d2a02dc60e6dc2fb5d7dfaac08b7b137cff3d4bf3158d38ecab656b69" + url: "https://pub.dev" source: hosted - version: "0.3.3" + version: "1.0.0" js: dependency: transitive description: name: js - url: "https://pub.dartlang.org" + sha256: "53385261521cc4a0c4658fd0ad07a7d14591cf8fc33abbceae306ddb974888dc" + url: "https://pub.dev" source: hosted - version: "0.6.1+1" - kernel: - dependency: transitive - description: - name: kernel - url: "https://pub.dartlang.org" - source: hosted - version: "0.3.29" + version: "0.7.2" logging: dependency: transitive description: name: logging - url: "https://pub.dartlang.org" + sha256: "0520a4826042a8a5d09ddd4755623a50d37ee536d79a70452aff8c8ad7bb6c27" + url: "https://pub.dev" source: hosted - version: "0.11.3+2" + version: "1.0.1" matcher: dependency: transitive description: name: matcher - url: "https://pub.dartlang.org" + sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 + url: "https://pub.dev" + source: hosted + version: "0.12.17" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + url: "https://pub.dev" source: hosted - version: "0.12.6" + version: "0.11.1" meta: dependency: transitive description: name: meta - url: "https://pub.dartlang.org" + sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c + url: "https://pub.dev" source: hosted - version: "1.1.8" + version: "1.16.0" mime: dependency: transitive description: name: mime - url: "https://pub.dartlang.org" - source: hosted - version: "0.9.6+3" - multi_server_socket: - dependency: transitive - description: - name: multi_server_socket - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.2" - node_interop: - dependency: transitive - description: - name: node_interop - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.3" - node_io: - dependency: transitive - description: - name: node_io - url: "https://pub.dartlang.org" + sha256: a7a98ea7f366e2cc9d2b20873815aebec5e2bc124fe0da9d3f7f59b0625ea180 + url: "https://pub.dev" source: hosted - version: "1.0.1+2" + version: "1.0.0" node_preamble: dependency: transitive description: name: node_preamble - url: "https://pub.dartlang.org" + sha256: "6e7eac89047ab8a8d26cf16127b5ed26de65209847630400f9aefd7cd5c730db" + url: "https://pub.dev" source: hosted - version: "1.4.8" + version: "2.0.2" package_config: dependency: transitive description: name: package_config - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.0" - package_resolver: - dependency: transitive - description: - name: package_resolver - url: "https://pub.dartlang.org" + sha256: f096c55ebb7deb7e384101542bfba8c52696c1b56fca2eb62827989ef2353bbc + url: "https://pub.dev" source: hosted - version: "1.0.10" + version: "2.2.0" path: dependency: transitive description: name: path - url: "https://pub.dartlang.org" + sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" + url: "https://pub.dev" source: hosted - version: "1.6.4" - pedantic: - dependency: transitive - description: - name: pedantic - url: "https://pub.dartlang.org" - source: hosted - version: "1.8.0+1" + version: "1.9.1" petitparser: dependency: transitive description: name: petitparser - url: "https://pub.dartlang.org" + sha256: "07c8f0b1913bcde1ff0d26e57ace2f3012ccbf2b204e070290dad3bb22797646" + url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "6.1.0" pool: dependency: transitive description: name: pool - url: "https://pub.dartlang.org" + sha256: "05955e3de2683e1746222efd14b775df7131139e07695dc8e24650f6b4204504" + url: "https://pub.dev" source: hosted - version: "1.4.0" + version: "1.5.0" + posix: + dependency: transitive + description: + name: posix + sha256: "6323a5b0fa688b6a010df4905a56b00181479e6d10534cecfecede2aa55add61" + url: "https://pub.dev" + source: hosted + version: "6.0.3" pub_semver: dependency: transitive description: name: pub_semver - url: "https://pub.dartlang.org" + sha256: "5bfcf68ca79ef689f8990d1160781b4bad40a3bd5e5218ad4076ddb7f4081585" + url: "https://pub.dev" source: hosted - version: "1.4.2" + version: "2.2.0" shelf: dependency: transitive description: name: shelf - url: "https://pub.dartlang.org" + sha256: cb24b18e3d32d08418e82daeef644c80ed616288de5e34cbae5c05879bfafe55 + url: "https://pub.dev" source: hosted - version: "0.7.5" + version: "1.1.1" shelf_packages_handler: dependency: transitive description: name: shelf_packages_handler - url: "https://pub.dartlang.org" + sha256: "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e" + url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "3.0.2" shelf_static: dependency: transitive description: name: shelf_static - url: "https://pub.dartlang.org" + sha256: "8584c0aa0f5756a61519b1a2fc2cd22ddbc518e9396bd33ebf06b9836bb23d13" + url: "https://pub.dev" source: hosted - version: "0.2.8" + version: "1.0.0" shelf_web_socket: dependency: transitive description: name: shelf_web_socket - url: "https://pub.dartlang.org" + sha256: "3632775c8e90d6c9712f883e633716432a27758216dfb61bd86a8321c0580925" + url: "https://pub.dev" source: hosted - version: "0.2.3" + version: "3.0.0" sky_engine: dependency: transitive description: flutter source: sdk - version: "0.0.99" + version: "0.0.0" source_map_stack_trace: dependency: transitive description: name: source_map_stack_trace - url: "https://pub.dartlang.org" + sha256: "8c463326277f68a628abab20580047b419c2ff66756fd0affd451f73f9508c11" + url: "https://pub.dev" source: hosted - version: "1.1.5" + version: "2.1.0" source_maps: dependency: transitive description: name: source_maps - url: "https://pub.dartlang.org" + sha256: "52de2200bb098de739794c82d09c41ac27b2e42fd7e23cce7b9c74bf653c7296" + url: "https://pub.dev" source: hosted - version: "0.10.8" + version: "0.10.10" source_span: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + sha256: d5f89a9e52b36240a80282b3dc0667dd36e53459717bb17b8fb102d30496606a + url: "https://pub.dev" source: hosted - version: "1.5.5" + version: "1.8.1" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.dartlang.org" + sha256: f8d9f247e2f9f90e32d1495ff32dac7e4ae34ffa7194c5ff8fcc0fd0e52df774 + url: "https://pub.dev" source: hosted - version: "1.9.3" + version: "1.10.0" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.dartlang.org" + sha256: db47e4797198ee601990820437179bb90219f918962318d494ada2b4b11e6f6d + url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" + url: "https://pub.dev" source: hosted - version: "1.0.5" + version: "1.4.1" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.dartlang.org" + sha256: a88162591b02c1f3a3db3af8ce1ea2b374bd75a7bb8d5e353bcfbdc79d719830 + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.2.0" test: dependency: "direct dev" description: name: test - url: "https://pub.dartlang.org" + sha256: "8f0eb7fa76b7d05a4f3707e0dbd581babef5b0915ca508b757cf15d0cabb56cb" + url: "https://pub.dev" source: hosted - version: "1.9.4" + version: "1.27.0" test_api: dependency: transitive description: name: test_api - url: "https://pub.dartlang.org" + sha256: "19a78f63e83d3a61f00826d09bc2f60e191bf3504183c001262be6ac75589fb8" + url: "https://pub.dev" source: hosted - version: "0.2.11" + version: "0.7.8" test_core: dependency: transitive description: name: test_core - url: "https://pub.dartlang.org" + sha256: bad9916601a4f2ef6e4dbc466fb712e4b42cf4917c3fd428b018f51984fce13b + url: "https://pub.dev" source: hosted - version: "0.2.15" + version: "0.6.13" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.dartlang.org" + sha256: "53bdf7e979cfbf3e28987552fd72f637e63f3c8724c9e56d9246942dc2fa36ee" + url: "https://pub.dev" source: hosted - version: "1.1.6" + version: "1.3.0" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.dartlang.org" + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" source: hosted - version: "2.0.8" + version: "2.1.4" vm_service: dependency: transitive description: name: vm_service - url: "https://pub.dartlang.org" + sha256: "45caa6c5917fa127b5dbcfbd1fa60b14e583afdc08bfc96dda38886ca252eb60" + url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "15.0.2" watcher: dependency: transitive description: name: watcher - url: "https://pub.dartlang.org" + sha256: "592ab6e2892f67760543fb712ff0177f4ec76c031f02f5b4ff8d3fc5eb9fb61a" + url: "https://pub.dev" source: hosted - version: "0.9.7+12" + version: "1.1.4" + web: + dependency: transitive + description: + name: web + sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a" + url: "https://pub.dev" + source: hosted + version: "1.1.1" + web_socket: + dependency: transitive + description: + name: web_socket + sha256: "34d64019aa8e36bf9842ac014bb5d2f5586ca73df5e4d9bf5c936975cae6982c" + url: "https://pub.dev" + source: hosted + version: "1.0.1" web_socket_channel: dependency: transitive description: name: web_socket_channel - url: "https://pub.dartlang.org" + sha256: d645757fb0f4773d602444000a8131ff5d48c9e47adfe9772652dd1a4f2d45c8 + url: "https://pub.dev" + source: hosted + version: "3.0.3" + webkit_inspection_protocol: + dependency: transitive + description: + name: webkit_inspection_protocol + sha256: "5adb6ab8ed14e22bb907aae7338f0c206ea21e7a27004e97664b16c120306f00" + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.0.0" xml: dependency: transitive description: name: xml - url: "https://pub.dartlang.org" + sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226 + url: "https://pub.dev" source: hosted - version: "3.5.0" + version: "6.5.0" yaml: dependency: transitive description: name: yaml - url: "https://pub.dartlang.org" + sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce + url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "3.1.3" sdks: - dart: ">=2.4.0 <3.0.0" + dart: ">=3.7.0 <4.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 51bb5b6..5646a64 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,20 +1,19 @@ name: flutter_luban description: An image compress package like Luban for Dart, based on image. This library has no system platform constraints. version: 0.1.12 -author: crazecoder <21527312@qq.com> homepage: https://github.com/crazecoder/flutter_luban environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=2.12.0 <4.0.0' dependencies: flutter: sdk: flutter - image: ^3.0.2 + image: ^4.5.4 dev_dependencies: - test: ^1.16.8 + test: ^1.9.4 # For information on the generic Dart part of this file, see the # following page: https://www.dartlang.org/tools/pub/pubspec