diff --git a/android/build.gradle b/android/build.gradle index 4f31800..20dffdd 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -22,6 +22,7 @@ rootProject.allprojects { apply plugin: 'com.android.library' android { + namespace "xyz.justsoft.video_thumbnail" compileSdkVersion 33 defaultConfig { diff --git a/example/lib/main.dart b/example/lib/main.dart index 115d516..572f01a 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -2,7 +2,6 @@ import 'dart:async'; import 'dart:typed_data'; import 'package:flutter/material.dart'; -import 'dart:io'; import 'package:video_thumbnail/video_thumbnail.dart'; import 'package:image_picker/image_picker.dart'; @@ -29,13 +28,13 @@ class ThumbnailRequest { final int quality; const ThumbnailRequest( - {this.video, - this.thumbnailPath, - this.imageFormat, - this.maxHeight, - this.maxWidth, - this.timeMs, - this.quality}); + {required this.video, + required this.thumbnailPath, + required this.imageFormat, + required this.maxHeight, + required this.maxWidth, + required this.timeMs, + required this.quality}); } class ThumbnailResult { @@ -43,44 +42,29 @@ class ThumbnailResult { final int dataSize; final int height; final int width; - const ThumbnailResult({this.image, this.dataSize, this.height, this.width}); + const ThumbnailResult( + {required this.image, + required this.dataSize, + required this.height, + required this.width}); } Future genThumbnail(ThumbnailRequest r) async { //WidgetsFlutterBinding.ensureInitialized(); Uint8List bytes; final Completer completer = Completer(); - if (r.thumbnailPath != null) { - final thumbnailPath = await VideoThumbnail.thumbnailFile( - video: r.video, - headers: { - "USERHEADER1": "user defined header1", - "USERHEADER2": "user defined header2", - }, - thumbnailPath: r.thumbnailPath, - imageFormat: r.imageFormat, - maxHeight: r.maxHeight, - maxWidth: r.maxWidth, - timeMs: r.timeMs, - quality: r.quality); - print("thumbnail file is located: $thumbnailPath"); - - final file = File(thumbnailPath); - bytes = file.readAsBytesSync(); - } else { - bytes = await VideoThumbnail.thumbnailData( - video: r.video, - headers: { - "USERHEADER1": "user defined header1", - "USERHEADER2": "user defined header2", - }, - imageFormat: r.imageFormat, - maxHeight: r.maxHeight, - maxWidth: r.maxWidth, - timeMs: r.timeMs, - quality: r.quality); - } + bytes = (await VideoThumbnail.thumbnailData( + video: r.video, + headers: { + "USERHEADER1": "user defined header1", + "USERHEADER2": "user defined header2", + }, + imageFormat: r.imageFormat, + maxHeight: r.maxHeight, + maxWidth: r.maxWidth, + timeMs: r.timeMs, + quality: r.quality))!; int _imageDataSize = bytes.length; print("image size: $_imageDataSize"); @@ -102,7 +86,8 @@ Future genThumbnail(ThumbnailRequest r) async { class GenThumbnailImage extends StatefulWidget { final ThumbnailRequest thumbnailRequest; - const GenThumbnailImage({Key key, this.thumbnailRequest}) : super(key: key); + const GenThumbnailImage({Key? key, required this.thumbnailRequest}) + : super(key: key); @override _GenThumbnailImageState createState() => _GenThumbnailImageState(); @@ -125,7 +110,7 @@ class _GenThumbnailImageState extends State { children: [ Center( child: Text( - "Image ${widget.thumbnailRequest.thumbnailPath == null ? 'data size' : 'file size'}: $_dataSize, width:$_width, height:$_height"), + "Image file size: $_dataSize, width:$_width, height:$_height"), ), Container( color: Colors.grey, @@ -183,9 +168,9 @@ class _DemoHomeState extends State { int _sizeW = 0; int _timeMs = 0; - GenThumbnailImage _futreImage; + late GenThumbnailImage _futreImage; - String _tempDir; + late String _tempDir; @override void initState() { @@ -275,7 +260,7 @@ class _DemoHomeState extends State { groupValue: _format, value: ImageFormat.JPEG, onChanged: (v) => setState(() { - _format = v; + _format = v!; _editNode.unfocus(); }), ), @@ -289,7 +274,7 @@ class _DemoHomeState extends State { groupValue: _format, value: ImageFormat.PNG, onChanged: (v) => setState(() { - _format = v; + _format = v!; _editNode.unfocus(); }), ), @@ -303,7 +288,7 @@ class _DemoHomeState extends State { groupValue: _format, value: ImageFormat.WEBP, onChanged: (v) => setState(() { - _format = v; + _format = v!; _editNode.unfocus(); }), ), @@ -349,7 +334,7 @@ class _DemoHomeState extends State { child: ListView( shrinkWrap: true, children: [ - (_futreImage != null) ? _futreImage : SizedBox(), + _futreImage, ], ), ), @@ -379,10 +364,10 @@ class _DemoHomeState extends State { children: [ FloatingActionButton( onPressed: () async { - File video = - await ImagePicker.pickVideo(source: ImageSource.camera); + XFile? video = + await ImagePicker().pickImage(source: ImageSource.camera); setState(() { - _video.text = video.path; + _video.text = video!.path; }); }, child: Icon(Icons.videocam), @@ -393,10 +378,10 @@ class _DemoHomeState extends State { ), FloatingActionButton( onPressed: () async { - File video = - await ImagePicker.pickVideo(source: ImageSource.gallery); + XFile? video = + await ImagePicker().pickVideo(source: ImageSource.gallery); setState(() { - _video.text = video?.path; + _video.text = video!.path; }); }, child: Icon(Icons.local_movies), @@ -412,7 +397,7 @@ class _DemoHomeState extends State { _futreImage = GenThumbnailImage( thumbnailRequest: ThumbnailRequest( video: _video.text, - thumbnailPath: null, + thumbnailPath: '', imageFormat: _format, maxHeight: _sizeH, maxWidth: _sizeW, diff --git a/example/pubspec.lock b/example/pubspec.lock index 47d7e94..f4c41cb 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -5,65 +5,98 @@ packages: dependency: transitive description: name: async - url: "https://pub.dartlang.org" + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" source: hosted - version: "2.8.2" + version: "2.11.0" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.dartlang.org" + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" characters: dependency: transitive description: name: characters - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" source: hosted - version: "1.3.1" + version: "1.3.0" clock: dependency: transitive description: name: clock - url: "https://pub.dartlang.org" + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.1" collection: dependency: transitive description: name: collection - url: "https://pub.dartlang.org" + sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf + url: "https://pub.dev" source: hosted - version: "1.15.0" + version: "1.19.0" + cross_file: + dependency: transitive + description: + name: cross_file + sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670" + url: "https://pub.dev" + source: hosted + version: "0.3.4+2" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.dartlang.org" + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.1" ffi: dependency: transitive description: name: ffi - url: "https://pub.dartlang.org" + sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" + url: "https://pub.dev" + source: hosted + version: "2.1.3" + file_selector_linux: + dependency: transitive + description: + name: file_selector_linux + sha256: "54cbbd957e1156d29548c7d9b9ec0c0ebb6de0a90452198683a7d23aed617a33" + url: "https://pub.dev" + source: hosted + version: "0.9.3+2" + file_selector_macos: + dependency: transitive + description: + name: file_selector_macos + sha256: "271ab9986df0c135d45c3cdb6bd0faa5db6f4976d3e4b437cf7d0f258d941bfc" + url: "https://pub.dev" + source: hosted + version: "0.9.4+2" + file_selector_platform_interface: + dependency: transitive + description: + name: file_selector_platform_interface + sha256: a3994c26f10378a039faa11de174d7b78eb8f79e4dd0af2a451410c1a5c3f66b + url: "https://pub.dev" source: hosted - version: "0.1.3" - file: + version: "2.6.2" + file_selector_windows: dependency: transitive description: - name: file - url: "https://pub.dartlang.org" + name: file_selector_windows + sha256: "8f5d2f6590d51ecd9179ba39c64f722edc15226cc93dcc8698466ad36a4a85a4" + url: "https://pub.dev" source: hosted - version: "5.2.1" + version: "0.9.3+3" flutter: dependency: "direct main" description: flutter @@ -73,222 +106,328 @@ packages: dependency: transitive description: name: flutter_plugin_android_lifecycle - url: "https://pub.dartlang.org" + sha256: "615a505aef59b151b46bbeef55b36ce2b6ed299d160c51d84281946f0aa0ce0e" + url: "https://pub.dev" source: hosted - version: "1.0.11" + version: "2.0.24" flutter_test: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" http: dependency: transitive description: name: http - url: "https://pub.dartlang.org" + sha256: fe7ab022b76f3034adc518fb6ea04a82387620e19977665ea18d30a1cf43442f + url: "https://pub.dev" source: hosted - version: "0.12.2" + version: "1.3.0" http_parser: dependency: transitive description: name: http_parser - url: "https://pub.dartlang.org" + sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571" + url: "https://pub.dev" source: hosted - version: "3.1.4" + version: "4.1.2" image_picker: dependency: "direct dev" description: name: image_picker - url: "https://pub.dartlang.org" + sha256: "021834d9c0c3de46bf0fe40341fa07168407f694d9b2bb18d532dc1261867f7a" + url: "https://pub.dev" + source: hosted + version: "1.1.2" + image_picker_android: + dependency: transitive + description: + name: image_picker_android + sha256: b62d34a506e12bb965e824b6db4fbf709ee4589cf5d3e99b45ab2287b008ee0c + url: "https://pub.dev" + source: hosted + version: "0.8.12+20" + image_picker_for_web: + dependency: transitive + description: + name: image_picker_for_web + sha256: "717eb042ab08c40767684327be06a5d8dbb341fe791d514e4b92c7bbe1b7bb83" + url: "https://pub.dev" + source: hosted + version: "3.0.6" + image_picker_ios: + dependency: transitive + description: + name: image_picker_ios + sha256: "05da758e67bc7839e886b3959848aa6b44ff123ab4b28f67891008afe8ef9100" + url: "https://pub.dev" + source: hosted + version: "0.8.12+2" + image_picker_linux: + dependency: transitive + description: + name: image_picker_linux + sha256: "4ed1d9bb36f7cd60aa6e6cd479779cc56a4cb4e4de8f49d487b1aaad831300fa" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + image_picker_macos: + dependency: transitive + description: + name: image_picker_macos + sha256: "1b90ebbd9dcf98fb6c1d01427e49a55bd96b5d67b8c67cf955d60a5de74207c1" + url: "https://pub.dev" source: hosted - version: "0.6.7+15" + version: "0.2.1+2" image_picker_platform_interface: dependency: transitive description: name: image_picker_platform_interface - url: "https://pub.dartlang.org" + sha256: "886d57f0be73c4b140004e78b9f28a8914a09e50c2d816bdd0520051a71236a0" + url: "https://pub.dev" source: hosted - version: "1.1.1" - intl: + version: "2.10.1" + image_picker_windows: + dependency: transitive + description: + name: image_picker_windows + sha256: "6ad07afc4eb1bc25f3a01084d28520496c4a3bb0cb13685435838167c9dcedeb" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + leak_tracker: dependency: transitive description: - name: intl - url: "https://pub.dartlang.org" + name: leak_tracker + sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06" + url: "https://pub.dev" source: hosted - version: "0.16.1" + version: "10.0.7" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379" + url: "https://pub.dev" + source: hosted + version: "3.0.8" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" matcher: dependency: transitive description: name: matcher - url: "https://pub.dartlang.org" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + url: "https://pub.dev" source: hosted - version: "0.12.11" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - url: "https://pub.dartlang.org" + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + url: "https://pub.dev" source: hosted - version: "0.1.3" + version: "0.11.1" meta: dependency: transitive description: name: meta - url: "https://pub.dartlang.org" + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 + url: "https://pub.dev" source: hosted - version: "1.7.0" + version: "1.15.0" + mime: + dependency: transitive + description: + name: mime + sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6" + url: "https://pub.dev" + source: hosted + version: "2.0.0" path: dependency: transitive description: name: path - url: "https://pub.dartlang.org" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.9.0" path_provider: dependency: "direct dev" description: name: path_provider - url: "https://pub.dartlang.org" + sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd" + url: "https://pub.dev" source: hosted - version: "1.6.24" - path_provider_linux: + version: "2.1.5" + path_provider_android: dependency: transitive description: - name: path_provider_linux - url: "https://pub.dartlang.org" + name: path_provider_android + sha256: "4adf4fd5423ec60a29506c76581bc05854c55e3a0b72d35bb28d661c9686edf2" + url: "https://pub.dev" source: hosted - version: "0.0.1+2" - path_provider_macos: + version: "2.2.15" + path_provider_foundation: dependency: transitive description: - name: path_provider_macos - url: "https://pub.dartlang.org" + name: path_provider_foundation + sha256: "4843174df4d288f5e29185bd6e72a6fbdf5a4a4602717eed565497429f179942" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 + url: "https://pub.dev" source: hosted - version: "0.0.4+6" + version: "2.2.1" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface - url: "https://pub.dartlang.org" + sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" + url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "2.1.2" path_provider_windows: dependency: transitive description: name: path_provider_windows - url: "https://pub.dartlang.org" + sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 + url: "https://pub.dev" source: hosted - version: "0.0.4+3" - pedantic: - dependency: transitive - description: - name: pedantic - url: "https://pub.dartlang.org" - source: hosted - version: "1.9.2" + version: "2.3.0" platform: dependency: transitive description: name: platform - url: "https://pub.dartlang.org" + sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" + url: "https://pub.dev" source: hosted - version: "2.2.1" + version: "3.1.6" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - url: "https://pub.dartlang.org" + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" source: hosted - version: "1.0.3" - process: - dependency: transitive - description: - name: process - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.13" + version: "2.1.8" sky_engine: dependency: transitive description: flutter source: sdk - version: "0.0.99" + version: "0.0.0" source_span: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" source: hosted - version: "1.8.1" + version: "1.10.0" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.dartlang.org" + sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377" + url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.12.0" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.dartlang.org" + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.2" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3" + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.3.0" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.dartlang.org" + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.1" test_api: dependency: transitive description: name: test_api - url: "https://pub.dartlang.org" + sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c" + url: "https://pub.dev" source: hosted - version: "0.4.8" + version: "0.7.3" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.dartlang.org" + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 + url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.4.0" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.dartlang.org" + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.4" video_thumbnail: dependency: "direct dev" description: path: ".." relative: true source: path - version: "0.5.1" - win32: + version: "0.5.3" + vm_service: dependency: transitive description: - name: win32 - url: "https://pub.dartlang.org" + name: vm_service + sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b + url: "https://pub.dev" source: hosted - version: "1.7.4" + version: "14.3.0" + web: + dependency: transitive + description: + name: web + sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb + url: "https://pub.dev" + source: hosted + version: "1.1.0" xdg_directories: dependency: transitive description: name: xdg_directories - url: "https://pub.dartlang.org" + sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15" + url: "https://pub.dev" source: hosted - version: "0.1.2" + version: "1.1.0" sdks: - dart: ">=2.14.0 <3.0.0" - flutter: ">=1.12.13+hotfix.5" + dart: ">=3.5.0 <4.0.0" + flutter: ">=3.24.0" diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 2805862..1f9363b 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -1,10 +1,10 @@ name: video_thumbnail_example description: Demonstrates how to use the video_thumbnail plugin. version: 0.1.7 -publish_to: 'none' +publish_to: "none" environment: - sdk: ">=2.5.2 <3.0.0" + sdk: ">=2.16.0 <3.0.0" dependencies: flutter: @@ -14,8 +14,8 @@ dev_dependencies: flutter_test: sdk: flutter - image_picker: '>=0.6.2 <2.0.0' - path_provider: ^1.6.0 + image_picker: ">=0.6.2 <2.0.0" + path_provider: ^2.1.1 video_thumbnail: path: ../ @@ -24,7 +24,6 @@ dev_dependencies: # The following section is specific to Flutter. flutter: - # The following line ensures that the Material Icons font is # included with your application, so that you can use the icons in # the material Icons class. diff --git a/lib/video_thumbnail.dart b/lib/video_thumbnail.dart index 78eb749..d6a9573 100644 --- a/lib/video_thumbnail.dart +++ b/lib/video_thumbnail.dart @@ -7,7 +7,6 @@ /// * [video_thumbnail](https://pub.dev/packages/video_thumbnail) /// import 'dart:async'; -import 'dart:typed_data'; import 'package:flutter/services.dart'; diff --git a/pubspec.lock b/pubspec.lock index 45b93c4..461388f 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,51 +5,50 @@ packages: dependency: transitive description: name: async - url: "https://pub.dartlang.org" + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" source: hosted - version: "2.5.0" + version: "2.11.0" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.dartlang.org" + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" characters: dependency: transitive description: name: characters - url: "https://pub.dartlang.org" + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" source: hosted - version: "1.1.0" - charcode: - dependency: transitive - description: - name: charcode - url: "https://pub.dartlang.org" - source: hosted - version: "1.2.0" + version: "1.3.0" clock: dependency: transitive description: name: clock - url: "https://pub.dartlang.org" + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.1" collection: dependency: transitive description: name: collection - url: "https://pub.dartlang.org" + sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf + url: "https://pub.dev" source: hosted - version: "1.15.0" + version: "1.19.0" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.dartlang.org" + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.1" flutter: dependency: "direct main" description: flutter @@ -60,88 +59,131 @@ packages: description: flutter source: sdk version: "0.0.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06" + url: "https://pub.dev" + source: hosted + version: "10.0.7" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379" + url: "https://pub.dev" + source: hosted + version: "3.0.8" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" matcher: dependency: transitive description: name: matcher - url: "https://pub.dartlang.org" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + url: "https://pub.dev" source: hosted - version: "0.12.10" + version: "0.12.16+1" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + url: "https://pub.dev" + source: hosted + version: "0.11.1" meta: dependency: transitive description: name: meta - url: "https://pub.dartlang.org" + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 + url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.15.0" path: dependency: transitive description: name: path - url: "https://pub.dartlang.org" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.9.0" sky_engine: dependency: transitive description: flutter source: sdk - version: "0.0.99" + version: "0.0.0" source_span: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.10.0" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.dartlang.org" + sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377" + url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.12.0" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.dartlang.org" + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.2" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3" + url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.3.0" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.dartlang.org" + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.1" test_api: dependency: transitive description: name: test_api - url: "https://pub.dartlang.org" + sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c" + url: "https://pub.dev" source: hosted - version: "0.2.19" - typed_data: + version: "0.7.3" + vector_math: dependency: transitive description: - name: typed_data - url: "https://pub.dartlang.org" + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" source: hosted - version: "1.3.0" - vector_math: + version: "2.1.4" + vm_service: dependency: transitive description: - name: vector_math - url: "https://pub.dartlang.org" + name: vm_service + sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "14.3.0" sdks: - dart: ">=2.12.0 <3.0.0" - flutter: ">=1.10.0" + dart: ">=3.4.0 <4.0.0" + flutter: ">=3.18.0-18.0.pre.54" diff --git a/pubspec.yaml b/pubspec.yaml index 56b2eaa..e017580 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,14 +1,13 @@ name: video_thumbnail description: A flutter plugin for creating a thumbnail from a local video file or from a video URL. version: 0.5.3 -# author: John Zhong , Tairs Rzajevs , Grigori , Hafeez Ahmed , Leynier , Andreas Petrov, julek-kal, Nils Reichardt, Ajb Coder +# author: John Zhong , Tairs Rzajevs , Grigori , Hafeez Ahmed , Leynier , Andreas Petrov, julek-kal, Nils Reichardt, Ajb Coder homepage: https://github.com/justsoft repository: https://github.com/justsoft/video_thumbnail issue_tracker: https://github.com/justsoft/video_thumbnail/issues environment: - sdk: '>=2.16.0 <3.0.0' - flutter: ">=1.10.0" + sdk: ">=2.16.0 <3.0.0" dependencies: flutter: diff --git a/test/video_thumbnail_test.dart b/test/video_thumbnail_test.dart index 86dd3b6..6951939 100644 --- a/test/video_thumbnail_test.dart +++ b/test/video_thumbnail_test.dart @@ -6,7 +6,8 @@ void main() { const MethodChannel channel = MethodChannel('video_thumbnail'); setUp(() { - channel.setMockMethodCallHandler((MethodCall methodCall) async { + TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger + .setMockMethodCallHandler(channel, (MethodCall methodCall) async { final m = methodCall.method; final a = methodCall.arguments; @@ -15,7 +16,8 @@ void main() { }); tearDown(() { - channel.setMockMethodCallHandler(null); + TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger + .setMockMethodCallHandler(channel, null); }); test('thumbnailData', () async {