From 63f4f87eecfe6868872a6cc10e088f8d634d8166 Mon Sep 17 00:00:00 2001 From: Rinzin Wangchuk Date: Mon, 27 Mar 2023 22:05:56 +0200 Subject: [PATCH 1/6] use html video element for web --- example/pubspec.lock | 8 ++- lib/src/view/widget/content/video_widget.dart | 18 ++++-- lib/src/widget/survey_kit_video_player.dart | 4 +- lib/src/widget/web_video_player.dart | 57 +++++++++++++++++++ pubspec.lock | 26 ++++++++- pubspec.yaml | 1 + 6 files changed, 104 insertions(+), 10 deletions(-) create mode 100644 lib/src/widget/web_video_player.dart diff --git a/example/pubspec.lock b/example/pubspec.lock index 282f834c..c49dcd77 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -82,7 +82,8 @@ packages: dependency: transitive description: name: characters - url: "https://pub.dartlang.org" + sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c + url: "https://pub.dev" source: hosted version: "1.2.1" chewie: @@ -452,7 +453,8 @@ packages: dependency: transitive description: name: typed_data - url: "https://pub.dartlang.org" + sha256: "26f87ade979c47a150c9eaab93ccd2bebe70a27dc0b4b29517f2904f04eb11a5" + url: "https://pub.dev" source: hosted version: "1.3.1" uuid: @@ -561,5 +563,5 @@ packages: source: hosted version: "1.0.0" sdks: - dart: ">=2.18.0 <3.0.0" + dart: ">=2.19.0 <4.0.0" flutter: ">=3.3.0" diff --git a/lib/src/view/widget/content/video_widget.dart b/lib/src/view/widget/content/video_widget.dart index b0315cfa..d8dbd85c 100644 --- a/lib/src/view/widget/content/video_widget.dart +++ b/lib/src/view/widget/content/video_widget.dart @@ -1,6 +1,8 @@ +import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:survey_kit/src/model/content/video_content.dart'; import 'package:survey_kit/src/widget/survey_kit_video_player.dart'; +import 'package:survey_kit/src/widget/web_video_player.dart'; class VideoWidget extends StatelessWidget { const VideoWidget({ @@ -12,17 +14,23 @@ class VideoWidget extends StatelessWidget { @override Widget build(BuildContext context) { + if (kIsWeb) return WebVideoPlayer(videoContent.url); + + final widget = kIsWeb + ? WebVideoPlayer(videoContent.url) + : SurveyKitVideoPlayer( + videoUrl: videoContent.url, + autoPlay: videoContent.autoPlay, + loop: videoContent.loop, + ); + return ConstrainedBox( constraints: BoxConstraints( minHeight: 100, maxHeight: videoContent.height ?? 500, maxWidth: videoContent.width ?? double.infinity, ), - child: SurveyKitVideoPlayer( - videoUrl: videoContent.url, - autoPlay: videoContent.autoPlay, - loop: videoContent.loop, - ), + child: widget, ); } } diff --git a/lib/src/widget/survey_kit_video_player.dart b/lib/src/widget/survey_kit_video_player.dart index 93104e99..1ad2bc76 100644 --- a/lib/src/widget/survey_kit_video_player.dart +++ b/lib/src/widget/survey_kit_video_player.dart @@ -40,7 +40,7 @@ class _SurveyKitVideoPlayerState extends State { @override Widget build(BuildContext context) { - return _controller.value.isInitialized + final videoWidget = _controller.value.isInitialized ? AspectRatio( aspectRatio: _chewieController.aspectRatio ?? 16 / 9, child: VisibilityDetector( @@ -61,6 +61,8 @@ class _SurveyKitVideoPlayerState extends State { child: CircularProgressIndicator.adaptive(), ), ); + + return videoWidget; } @override diff --git a/lib/src/widget/web_video_player.dart b/lib/src/widget/web_video_player.dart new file mode 100644 index 00000000..79768dcd --- /dev/null +++ b/lib/src/widget/web_video_player.dart @@ -0,0 +1,57 @@ +import 'dart:ui' as ui; + +import 'package:flutter/material.dart'; +import 'package:universal_html/html.dart' as html; + +class WebVideoPlayer extends StatefulWidget { + const WebVideoPlayer( + this.src, { + super.key, + this.autoplay = true, + this.controls = true, + this.startAt = 0, + }); + + final String src; + final double startAt; + + final bool autoplay; + + final bool controls; + + @override + State createState() => _WebVideoPlayerState(); +} + +class _WebVideoPlayerState extends State { + @override + void initState() { + super.initState(); + // String? url = 'http://www.website.com/pathtovideo' '#t=${widget.startAt}'; + // Do not remove the below comment - Fix for missing ui.platformViewRegistry in dart.ui + // ignore: undefined_prefixed_name, avoid_dynamic_calls + ui.platformViewRegistry.registerViewFactory(widget.src, (int viewId) { + //https: //api.flutter.dev/flutter/dart-html/VideoElement-class.html + final video = html.VideoElement() + ..src = widget.src + ..autoplay = widget.autoplay + ..controls = widget.controls + ..style.border = 'none' + ..style.borderColor = 'red' + ..style.height = '100%' + ..style.width = '100%' + ..attributes['controlsList'] = 'nodownload' + + // Allows Safari iOS to play the video inline + // ignore: cascade_invocations + ..setAttribute('playsinline', 'true'); + + return video; + }); + } + + @override + Widget build(BuildContext context) { + return HtmlElementView(viewType: widget.src); + } +} diff --git a/pubspec.lock b/pubspec.lock index f0648df4..caf3eebe 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -155,6 +155,14 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.2.1" + charcode: + dependency: transitive + description: + name: charcode + sha256: fb98c0f6d12c920a02ee2d998da788bca066ca5f148492b7085ee23372b12306 + url: "https://pub.dev" + source: hosted + version: "1.3.1" checked_yaml: dependency: transitive description: @@ -672,6 +680,22 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.3.1" + universal_html: + dependency: "direct main" + description: + name: universal_html + sha256: ed4f24120c9b1b4721d44e439f7a47d09d9f1b7b868bc84c9d6d373a4a8732af + url: "https://pub.dev" + source: hosted + version: "2.2.1" + universal_io: + dependency: transitive + description: + name: universal_io + sha256: "06866290206d196064fd61df4c7aea1ffe9a4e7c4ccaa8fcded42dd41948005d" + url: "https://pub.dev" + source: hosted + version: "2.2.0" uuid: dependency: "direct main" description: @@ -799,5 +823,5 @@ packages: source: hosted version: "3.1.1" sdks: - dart: ">=2.18.0 <3.0.0" + dart: ">=2.19.0 <3.0.0" flutter: ">=3.3.0" diff --git a/pubspec.yaml b/pubspec.yaml index 76c22d38..6e1a133b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -22,6 +22,7 @@ dependencies: json_annotation: ^4.0.1 lottie: ^2.1.0 uuid: ^3.0.4 + universal_html: ^2.2.1 video_player: ^2.1.6 visibility_detector: ^0.3.3 From bcc19cec3c4b5cf096c5bbd3989a5f78923029a4 Mon Sep 17 00:00:00 2001 From: Rinzin Wangchuk Date: Tue, 28 Mar 2023 13:23:05 +0200 Subject: [PATCH 2/6] add support for web video player --- .../android/app/src/main/AndroidManifest.xml | 1 + example/android/build.gradle | 2 +- example/pubspec.lock | 5 +- .../platform_view_registry.dart | 2 + .../platform_view_registry_shim.dart | 10 +++ lib/src/widget/web_video_player.dart | 72 ++++++++++++------- pubspec.lock | 5 +- pubspec.yaml | 6 +- 8 files changed, 71 insertions(+), 32 deletions(-) create mode 100644 lib/src/widget/platform_view_registry/platform_view_registry.dart create mode 100644 lib/src/widget/platform_view_registry/platform_view_registry_shim.dart diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml index b39465c6..8273f2c7 100644 --- a/example/android/app/src/main/AndroidManifest.xml +++ b/example/android/app/src/main/AndroidManifest.xml @@ -7,6 +7,7 @@ android:icon="@mipmap/ic_launcher"> createState() => _WebVideoPlayerState(); } class _WebVideoPlayerState extends State { + late final html.VideoElement video; + @override void initState() { super.initState(); - // String? url = 'http://www.website.com/pathtovideo' '#t=${widget.startAt}'; - // Do not remove the below comment - Fix for missing ui.platformViewRegistry in dart.ui - // ignore: undefined_prefixed_name, avoid_dynamic_calls - ui.platformViewRegistry.registerViewFactory(widget.src, (int viewId) { - //https: //api.flutter.dev/flutter/dart-html/VideoElement-class.html - final video = html.VideoElement() - ..src = widget.src - ..autoplay = widget.autoplay - ..controls = widget.controls - ..style.border = 'none' - ..style.borderColor = 'red' - ..style.height = '100%' - ..style.width = '100%' - ..attributes['controlsList'] = 'nodownload' - - // Allows Safari iOS to play the video inline - // ignore: cascade_invocations - ..setAttribute('playsinline', 'true'); - - return video; - }); + final url = '${widget.src}' '#t=${widget.startAt}'; + + video = html.VideoElement() + ..src = url + ..autoplay = widget.autoplay + ..controls = widget.controls + ..style.border = 'none' + ..style.height = '100%' + ..style.width = '100%' + + //Remove the download option from controls + ..setAttribute('controlsList', 'nodownload') + + // Allows Safari iOS to play the video inline + // ignore: cascade_invocations + ..setAttribute('playsinline', 'true'); + + platformViewRegistry.registerViewFactory( + widget.src, + (int viewId) => video, + ); + } + + @override + void dispose() { + video.remove(); + super.dispose(); } @override Widget build(BuildContext context) { - return HtmlElementView(viewType: widget.src); + return AspectRatio( + aspectRatio: widget.aspectRatio, + child: VisibilityDetector( + key: Key(widget.src), + onVisibilityChanged: (info) { + if (info.visibleFraction == 0 && mounted) { + video.pause(); + } + }, + child: HtmlElementView(viewType: widget.src), + ), + ); } } diff --git a/pubspec.lock b/pubspec.lock index caf3eebe..818bfdab 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -714,9 +714,10 @@ packages: dependency: "direct main" description: name: video_player - url: "https://pub.dartlang.org" + sha256: "868a139229acb5018d22aded3eb9cb4767ff43a8216573c086b6c535a4957481" + url: "https://pub.dev" source: hosted - version: "2.5.1" + version: "2.6.0" video_player_android: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 6e1a133b..e275a034 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -11,8 +11,8 @@ environment: dependencies: audioplayers: ^3.0.1 - chewie: ^1.3.6 - collection: ^1.16.0 + chewie: ^1.4.0 + collection: ^1.17.0 cupertino_icons: ^1.0.2 flutter: sdk: flutter @@ -23,7 +23,7 @@ dependencies: lottie: ^2.1.0 uuid: ^3.0.4 universal_html: ^2.2.1 - video_player: ^2.1.6 + video_player: ^2.6.0 visibility_detector: ^0.3.3 dev_dependencies: From f29e9db2a4c2380438e12c4440af00799cd5cc87 Mon Sep 17 00:00:00 2001 From: Rinzin Wangchuk Date: Tue, 28 Mar 2023 13:36:51 +0200 Subject: [PATCH 3/6] update package registry --- example/pubspec.lock | 269 +++++++++++++++++++++----------- pubspec.lock | 356 ++++++++++++++++++++++++++++--------------- 2 files changed, 416 insertions(+), 209 deletions(-) diff --git a/example/pubspec.lock b/example/pubspec.lock index 62c521aa..ad0cd0a2 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -5,79 +5,90 @@ packages: dependency: transitive description: name: archive - url: "https://pub.dartlang.org" + sha256: d6347d54a2d8028e0437e3c099f66fdb8ae02c4720c1e7534c9f24c10351f85d + url: "https://pub.dev" source: hosted version: "3.3.6" args: dependency: transitive description: name: args - url: "https://pub.dartlang.org" + sha256: "4cab82a83ffef80b262ddedf47a0a8e56ee6fbf7fe21e6e768b02792034dd440" + url: "https://pub.dev" source: hosted version: "2.4.0" async: dependency: transitive description: name: async - url: "https://pub.dartlang.org" + sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0 + url: "https://pub.dev" source: hosted - version: "2.9.0" + version: "2.10.0" audioplayers: dependency: transitive description: name: audioplayers - url: "https://pub.dartlang.org" + sha256: "16451eab798b23ad9307aef6f9ca62bb8fb06542af8810eead0d236d3fd40a42" + url: "https://pub.dev" source: hosted version: "3.0.1" audioplayers_android: dependency: transitive description: name: audioplayers_android - url: "https://pub.dartlang.org" + sha256: b2c833e6f718b6b030454e329931229afafe9327fdb002874dd544dc8bf2484d + url: "https://pub.dev" source: hosted version: "2.0.0" audioplayers_darwin: dependency: transitive description: name: audioplayers_darwin - url: "https://pub.dartlang.org" + sha256: e7a3c8759bf11ecfe4b20df338bf9f3d37c7719a5761c46a3833aba0ceeaacff + url: "https://pub.dev" source: hosted version: "3.0.1" audioplayers_linux: dependency: transitive description: name: audioplayers_linux - url: "https://pub.dartlang.org" + sha256: e95b65e1f4d4764601dac5e65f8d8186fc29401043ab020f1dacec483d708707 + url: "https://pub.dev" source: hosted version: "1.0.4" audioplayers_platform_interface: dependency: transitive description: name: audioplayers_platform_interface - url: "https://pub.dartlang.org" + sha256: "178581a44cb685fd798d2108111d2e98cca3400e30b9c3a05546f124fb37f600" + url: "https://pub.dev" source: hosted version: "4.0.0" audioplayers_web: dependency: transitive description: name: audioplayers_web - url: "https://pub.dartlang.org" + sha256: "859ba09be2a57e57a787273f18c8cf0d9b61383870c5ee4b5632fe9adbc37edf" + url: "https://pub.dev" source: hosted version: "2.2.0" audioplayers_windows: dependency: transitive description: name: audioplayers_windows - url: "https://pub.dartlang.org" + sha256: "622e01c4c357c2aaf1b956c3a0f89d97c3cb40315c03f16e3b6c2a31ff9c38bc" + url: "https://pub.dev" source: hosted version: "1.1.3" 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: @@ -86,81 +97,100 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.1" + charcode: + dependency: transitive + description: + name: charcode + sha256: fb98c0f6d12c920a02ee2d998da788bca066ca5f148492b7085ee23372b12306 + url: "https://pub.dev" + source: hosted + version: "1.3.1" chewie: dependency: transitive description: name: chewie - url: "https://pub.dartlang.org" + sha256: e9da4898ee4859825404f507969f57113c04ca0060e152b95c9afd73934126ad + url: "https://pub.dev" source: hosted version: "1.4.0" clock: dependency: transitive description: name: clock - url: "https://pub.dartlang.org" + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" source: hosted version: "1.1.1" collection: dependency: transitive description: name: collection - url: "https://pub.dartlang.org" + sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0 + url: "https://pub.dev" source: hosted - version: "1.16.0" + version: "1.17.0" convert: dependency: transitive description: name: convert - url: "https://pub.dartlang.org" + sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + url: "https://pub.dev" source: hosted version: "3.1.1" cross_file: dependency: transitive description: name: cross_file - url: "https://pub.dartlang.org" + sha256: "0b0036e8cccbfbe0555fd83c1d31a6f30b77a96b598b35a5d36dd41f718695e9" + url: "https://pub.dev" source: hosted version: "0.3.3+4" crypto: dependency: transitive description: name: crypto - url: "https://pub.dartlang.org" + sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67 + url: "https://pub.dev" source: hosted version: "3.0.2" csslib: dependency: transitive description: name: csslib - url: "https://pub.dartlang.org" + sha256: b36c7f7e24c0bdf1bf9a3da461c837d1de64b9f8beb190c9011d8c72a3dfd745 + url: "https://pub.dev" source: hosted version: "0.17.2" cupertino_icons: dependency: transitive description: name: cupertino_icons - url: "https://pub.dartlang.org" + sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be + url: "https://pub.dev" source: hosted version: "1.0.5" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.dartlang.org" + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" source: hosted version: "1.3.1" ffi: dependency: transitive description: name: ffi - url: "https://pub.dartlang.org" + sha256: a38574032c5f1dd06c4aee541789906c12ccaab8ba01446e800d9c5b79c4a978 + url: "https://pub.dev" source: hosted version: "2.0.1" file: dependency: transitive description: name: file - url: "https://pub.dartlang.org" + sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" + url: "https://pub.dev" source: hosted version: "6.1.4" flutter: @@ -172,14 +202,16 @@ packages: dependency: transitive description: name: flutter_markdown - url: "https://pub.dartlang.org" + sha256: "7b25c10de1fea883f3c4f9b8389506b54053cd00807beab69fd65c8653a2711f" + url: "https://pub.dev" source: hosted version: "0.6.14" flutter_plugin_android_lifecycle: dependency: transitive description: name: flutter_plugin_android_lifecycle - url: "https://pub.dartlang.org" + sha256: "60fc7b78455b94e6de2333d2f95196d32cf5c22f4b0b0520a628804cb463503b" + url: "https://pub.dev" source: hosted version: "2.0.7" flutter_test: @@ -196,203 +228,232 @@ packages: dependency: transitive description: name: html - url: "https://pub.dartlang.org" + sha256: d9793e10dbe0e6c364f4c59bf3e01fb33a9b2a674bc7a1081693dba0614b6269 + url: "https://pub.dev" source: hosted version: "0.15.1" http: dependency: transitive description: name: http - url: "https://pub.dartlang.org" + sha256: "6aa2946395183537c8b880962d935877325d6a09a2867c3970c05c0fed6ac482" + url: "https://pub.dev" source: hosted version: "0.13.5" http_parser: dependency: transitive description: name: http_parser - url: "https://pub.dartlang.org" + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" source: hosted version: "4.0.2" image_picker: dependency: transitive description: name: image_picker - url: "https://pub.dartlang.org" + sha256: f98d76672d309c8b7030c323b3394669e122d52b307d2bbd8d06bd70f5b2aabe + url: "https://pub.dev" source: hosted version: "0.8.6+1" image_picker_android: dependency: transitive description: name: image_picker_android - url: "https://pub.dartlang.org" + sha256: "385f12ee9c7288575572c7873a332016ec45ebd092e1c2f6bd421b4a9ad21f1d" + url: "https://pub.dev" source: hosted version: "0.8.5+6" image_picker_for_web: dependency: transitive description: name: image_picker_for_web - url: "https://pub.dartlang.org" + sha256: "7d319fb74955ca46d9bf7011497860e3923bb67feebcf068f489311065863899" + url: "https://pub.dev" source: hosted version: "2.1.10" image_picker_ios: dependency: transitive description: name: image_picker_ios - url: "https://pub.dartlang.org" + sha256: "8ffb14b43713d7c43fb21299cc18181cc5b39bd3ea1cc427a085c6400fe5aa52" + url: "https://pub.dev" source: hosted version: "0.8.6+7" image_picker_platform_interface: dependency: transitive description: name: image_picker_platform_interface - url: "https://pub.dartlang.org" + sha256: "7cef2f28f4f2fef99180f636c3d446b4ccbafd6ba0fad2adc9a80c4040f656b8" + url: "https://pub.dev" source: hosted version: "2.6.2" intl: dependency: transitive description: name: intl - url: "https://pub.dartlang.org" + sha256: a3715e3bc90294e971cb7dc063fbf3cd9ee0ebf8604ffeafabd9e6f16abbdbe6 + url: "https://pub.dev" source: hosted version: "0.18.0" js: dependency: transitive description: name: js - url: "https://pub.dartlang.org" + sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7" + url: "https://pub.dev" source: hosted - version: "0.6.4" + version: "0.6.5" json_annotation: dependency: transitive description: name: json_annotation - url: "https://pub.dartlang.org" + sha256: c33da08e136c3df0190bd5bbe51ae1df4a7d96e7954d1d7249fea2968a72d317 + url: "https://pub.dev" source: hosted version: "4.8.0" lottie: dependency: transitive description: name: lottie - url: "https://pub.dartlang.org" + sha256: "49bbc544e44bf0c734ccda29b182e3516a12f5021ea98b206cf31a168b0f97da" + url: "https://pub.dev" source: hosted version: "2.2.0" markdown: dependency: transitive description: name: markdown - url: "https://pub.dartlang.org" + sha256: b3c60dee8c2af50ad0e6e90cceba98e47718a6ee0a7a6772c77846a0cc21f78b + url: "https://pub.dev" source: hosted version: "7.0.1" matcher: dependency: transitive description: name: matcher - url: "https://pub.dartlang.org" + sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72" + url: "https://pub.dev" source: hosted - version: "0.12.12" + version: "0.12.13" material_color_utilities: dependency: transitive description: name: material_color_utilities - url: "https://pub.dartlang.org" + sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 + url: "https://pub.dev" source: hosted - version: "0.1.5" + version: "0.2.0" meta: dependency: transitive description: name: meta - url: "https://pub.dartlang.org" + sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42" + url: "https://pub.dev" source: hosted version: "1.8.0" nested: dependency: transitive description: name: nested - url: "https://pub.dartlang.org" + sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20" + url: "https://pub.dev" source: hosted version: "1.0.0" path: dependency: transitive description: name: path - url: "https://pub.dartlang.org" + sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b + url: "https://pub.dev" source: hosted version: "1.8.2" path_provider: dependency: transitive description: name: path_provider - url: "https://pub.dartlang.org" + sha256: dcea5feb97d8abf90cab9e9030b497fb7c3cbf26b7a1fe9e3ef7dcb0a1ddec95 + url: "https://pub.dev" source: hosted version: "2.0.12" path_provider_android: dependency: transitive description: name: path_provider_android - url: "https://pub.dartlang.org" + sha256: a776c088d671b27f6e3aa8881d64b87b3e80201c64e8869b811325de7a76c15e + url: "https://pub.dev" source: hosted version: "2.0.22" path_provider_foundation: dependency: transitive description: name: path_provider_foundation - url: "https://pub.dartlang.org" + sha256: "62a68e7e1c6c459f9289859e2fae58290c981ce21d1697faf54910fe1faa4c74" + url: "https://pub.dev" source: hosted version: "2.1.1" path_provider_linux: dependency: transitive description: name: path_provider_linux - url: "https://pub.dartlang.org" + sha256: "2e32f1640f07caef0d3cb993680f181c79e54a3827b997d5ee221490d131fbd9" + url: "https://pub.dev" source: hosted version: "2.1.8" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface - url: "https://pub.dartlang.org" + sha256: f0abc8ebd7253741f05488b4813d936b4d07c6bae3e86148a09e342ee4b08e76 + url: "https://pub.dev" source: hosted version: "2.0.5" path_provider_windows: dependency: transitive description: name: path_provider_windows - url: "https://pub.dartlang.org" + sha256: bcabbe399d4042b8ee687e17548d5d3f527255253b4a639f5f8d2094a9c2b45c + url: "https://pub.dev" source: hosted version: "2.1.3" platform: dependency: transitive description: name: platform - url: "https://pub.dartlang.org" + sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76" + url: "https://pub.dev" source: hosted version: "3.1.0" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - url: "https://pub.dartlang.org" + sha256: dbf0f707c78beedc9200146ad3cb0ab4d5da13c246336987be6940f026500d3a + url: "https://pub.dev" source: hosted version: "2.1.3" pointycastle: dependency: transitive description: name: pointycastle - url: "https://pub.dartlang.org" + sha256: db7306cf0249f838d1a24af52b5a5887c5bf7f31d8bb4e827d071dc0939ad346 + url: "https://pub.dev" source: hosted version: "3.6.2" process: dependency: transitive description: name: process - url: "https://pub.dartlang.org" + sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09" + url: "https://pub.dev" source: hosted version: "4.2.4" provider: dependency: transitive description: name: provider - url: "https://pub.dartlang.org" + sha256: cdbe7530b12ecd9eb455bdaa2fcb8d4dad22e80b8afb4798b41479d5ce26847f + url: "https://pub.dev" source: hosted version: "6.0.5" sky_engine: @@ -404,30 +465,34 @@ packages: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 + url: "https://pub.dev" source: hosted - version: "1.9.0" + version: "1.9.1" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.dartlang.org" + sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.11.0" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.dartlang.org" + sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.2.0" survey_kit: dependency: "direct main" description: @@ -439,16 +504,18 @@ packages: dependency: transitive description: name: term_glyph - url: "https://pub.dartlang.org" + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" source: hosted version: "1.2.1" test_api: dependency: transitive description: name: test_api - url: "https://pub.dartlang.org" + sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206 + url: "https://pub.dev" source: hosted - version: "0.4.12" + version: "0.4.16" typed_data: dependency: transitive description: @@ -457,20 +524,38 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.1" + universal_html: + dependency: transitive + description: + name: universal_html + sha256: ed4f24120c9b1b4721d44e439f7a47d09d9f1b7b868bc84c9d6d373a4a8732af + url: "https://pub.dev" + source: hosted + version: "2.2.1" + universal_io: + dependency: transitive + description: + name: universal_io + sha256: "06866290206d196064fd61df4c7aea1ffe9a4e7c4ccaa8fcded42dd41948005d" + url: "https://pub.dev" + source: hosted + version: "2.2.0" uuid: dependency: transitive description: name: uuid - url: "https://pub.dartlang.org" + sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + url: "https://pub.dev" source: hosted version: "3.0.7" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.dartlang.org" + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.4" video_player: dependency: transitive description: @@ -483,86 +568,98 @@ packages: dependency: transitive description: name: video_player_android - url: "https://pub.dartlang.org" + sha256: "984388511230bac63feb53b2911a70e829fe0976b6b2213f5c579c4e0a882db3" + url: "https://pub.dev" source: hosted version: "2.3.10" video_player_avfoundation: dependency: transitive description: name: video_player_avfoundation - url: "https://pub.dartlang.org" + sha256: d9f7a46d6a77680adb03ec05a381025d6e890ebe636637c6c3014cc3926b97e9 + url: "https://pub.dev" source: hosted version: "2.3.8" video_player_platform_interface: dependency: transitive description: name: video_player_platform_interface - url: "https://pub.dartlang.org" + sha256: "42bb75de5e9b79e1f20f1d95f688fac0f95beac4d89c6eb2cd421724d4432dae" + url: "https://pub.dev" source: hosted version: "6.0.1" video_player_web: dependency: transitive description: name: video_player_web - url: "https://pub.dartlang.org" + sha256: b649b07b8f8f553bee4a97a0a53d0fe78a70b115eafaf0105b612b32b05ddb99 + url: "https://pub.dev" source: hosted version: "2.0.13" visibility_detector: dependency: transitive description: name: visibility_detector - url: "https://pub.dartlang.org" + sha256: "15c54a459ec2c17b4705450483f3d5a2858e733aee893dcee9d75fd04814940d" + url: "https://pub.dev" source: hosted version: "0.3.3" wakelock: dependency: transitive description: name: wakelock - url: "https://pub.dartlang.org" + sha256: "769ecf42eb2d07128407b50cb93d7c10bd2ee48f0276ef0119db1d25cc2f87db" + url: "https://pub.dev" source: hosted version: "0.6.2" wakelock_macos: dependency: transitive description: name: wakelock_macos - url: "https://pub.dartlang.org" + sha256: "047c6be2f88cb6b76d02553bca5a3a3b95323b15d30867eca53a19a0a319d4cd" + url: "https://pub.dev" source: hosted version: "0.4.0" wakelock_platform_interface: dependency: transitive description: name: wakelock_platform_interface - url: "https://pub.dartlang.org" + sha256: "1f4aeb81fb592b863da83d2d0f7b8196067451e4df91046c26b54a403f9de621" + url: "https://pub.dev" source: hosted version: "0.3.0" wakelock_web: dependency: transitive description: name: wakelock_web - url: "https://pub.dartlang.org" + sha256: "1b256b811ee3f0834888efddfe03da8d18d0819317f20f6193e2922b41a501b5" + url: "https://pub.dev" source: hosted version: "0.4.0" wakelock_windows: dependency: transitive description: name: wakelock_windows - url: "https://pub.dartlang.org" + sha256: "857f77b3fe6ae82dd045455baa626bc4b93cb9bb6c86bf3f27c182167c3a5567" + url: "https://pub.dev" source: hosted version: "0.2.1" win32: dependency: transitive description: name: win32 - url: "https://pub.dartlang.org" + sha256: c9ebe7ee4ab0c2194e65d3a07d8c54c5d00bb001b76081c4a04cdb8448b59e46 + url: "https://pub.dev" source: hosted version: "3.1.3" xdg_directories: dependency: transitive description: name: xdg_directories - url: "https://pub.dartlang.org" + sha256: ee1505df1426458f7f60aac270645098d318a8b4766d85fde75f76f2e21807d1 + url: "https://pub.dev" source: hosted version: "1.0.0" sdks: - dart: ">=2.19.0 <4.0.0" + dart: ">=2.18.0 <3.0.0" flutter: ">=3.3.0" diff --git a/pubspec.lock b/pubspec.lock index 818bfdab..783cad95 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,154 +5,176 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - url: "https://pub.dartlang.org" + sha256: "3444216bfd127af50bbe4862d8843ed44db946dd933554f0d7285e89f10e28ac" + url: "https://pub.dev" source: hosted version: "50.0.0" analyzer: dependency: transitive description: name: analyzer - url: "https://pub.dartlang.org" + sha256: "68796c31f510c8455a06fed75fc97d8e5ad04d324a830322ab3efc9feb6201c1" + url: "https://pub.dev" source: hosted version: "5.2.0" archive: dependency: transitive description: name: archive - url: "https://pub.dartlang.org" + sha256: d6347d54a2d8028e0437e3c099f66fdb8ae02c4720c1e7534c9f24c10351f85d + url: "https://pub.dev" source: hosted version: "3.3.6" args: dependency: transitive description: name: args - url: "https://pub.dartlang.org" + sha256: "4cab82a83ffef80b262ddedf47a0a8e56ee6fbf7fe21e6e768b02792034dd440" + url: "https://pub.dev" source: hosted version: "2.4.0" async: dependency: transitive description: name: async - url: "https://pub.dartlang.org" + sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0 + url: "https://pub.dev" source: hosted - version: "2.9.0" + version: "2.10.0" audioplayers: dependency: "direct main" description: name: audioplayers - url: "https://pub.dartlang.org" + sha256: "16451eab798b23ad9307aef6f9ca62bb8fb06542af8810eead0d236d3fd40a42" + url: "https://pub.dev" source: hosted version: "3.0.1" audioplayers_android: dependency: transitive description: name: audioplayers_android - url: "https://pub.dartlang.org" + sha256: b2c833e6f718b6b030454e329931229afafe9327fdb002874dd544dc8bf2484d + url: "https://pub.dev" source: hosted version: "2.0.0" audioplayers_darwin: dependency: transitive description: name: audioplayers_darwin - url: "https://pub.dartlang.org" + sha256: e7a3c8759bf11ecfe4b20df338bf9f3d37c7719a5761c46a3833aba0ceeaacff + url: "https://pub.dev" source: hosted version: "3.0.1" audioplayers_linux: dependency: transitive description: name: audioplayers_linux - url: "https://pub.dartlang.org" + sha256: e95b65e1f4d4764601dac5e65f8d8186fc29401043ab020f1dacec483d708707 + url: "https://pub.dev" source: hosted version: "1.0.4" audioplayers_platform_interface: dependency: transitive description: name: audioplayers_platform_interface - url: "https://pub.dartlang.org" + sha256: "178581a44cb685fd798d2108111d2e98cca3400e30b9c3a05546f124fb37f600" + url: "https://pub.dev" source: hosted version: "4.0.0" audioplayers_web: dependency: transitive description: name: audioplayers_web - url: "https://pub.dartlang.org" + sha256: "859ba09be2a57e57a787273f18c8cf0d9b61383870c5ee4b5632fe9adbc37edf" + url: "https://pub.dev" source: hosted version: "2.2.0" audioplayers_windows: dependency: transitive description: name: audioplayers_windows - url: "https://pub.dartlang.org" + sha256: "622e01c4c357c2aaf1b956c3a0f89d97c3cb40315c03f16e3b6c2a31ff9c38bc" + url: "https://pub.dev" source: hosted version: "1.1.3" 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" build: dependency: transitive description: name: build - url: "https://pub.dartlang.org" + sha256: "3fbda25365741f8251b39f3917fb3c8e286a96fd068a5a242e11c2012d495777" + url: "https://pub.dev" source: hosted version: "2.3.1" build_config: dependency: transitive description: name: build_config - url: "https://pub.dartlang.org" + sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1 + url: "https://pub.dev" source: hosted version: "1.1.1" build_daemon: dependency: transitive description: name: build_daemon - url: "https://pub.dartlang.org" + sha256: "6bc5544ea6ce4428266e7ea680e945c68806c4aae2da0eb5e9ccf38df8d6acbf" + url: "https://pub.dev" source: hosted version: "3.1.0" build_resolvers: dependency: transitive description: name: build_resolvers - url: "https://pub.dartlang.org" + sha256: "7c35a3a7868626257d8aee47b51c26b9dba11eaddf3431117ed2744951416aab" + url: "https://pub.dev" source: hosted version: "2.1.0" build_runner: dependency: "direct dev" description: name: build_runner - url: "https://pub.dartlang.org" + sha256: b0a8a7b8a76c493e85f1b84bffa0588859a06197863dba8c9036b15581fd9727 + url: "https://pub.dev" source: hosted version: "2.3.3" build_runner_core: dependency: transitive description: name: build_runner_core - url: "https://pub.dartlang.org" + sha256: "14febe0f5bac5ae474117a36099b4de6f1dbc52df6c5e55534b3da9591bf4292" + url: "https://pub.dev" source: hosted version: "7.2.7" built_collection: dependency: transitive description: name: built_collection - url: "https://pub.dartlang.org" + sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" + url: "https://pub.dev" source: hosted version: "5.1.1" built_value: dependency: transitive description: name: built_value - url: "https://pub.dartlang.org" + sha256: "169565c8ad06adb760c3645bf71f00bff161b00002cace266cad42c5d22a7725" + url: "https://pub.dev" source: hosted version: "8.4.3" characters: dependency: transitive description: name: characters - url: "https://pub.dartlang.org" + sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c + url: "https://pub.dev" source: hosted version: "1.2.1" charcode: @@ -167,105 +189,120 @@ packages: dependency: transitive description: name: checked_yaml - url: "https://pub.dartlang.org" + sha256: "3d1505d91afa809d177efd4eed5bb0eb65805097a1463abdd2add076effae311" + url: "https://pub.dev" source: hosted version: "2.0.2" chewie: dependency: "direct main" description: name: chewie - url: "https://pub.dartlang.org" + sha256: e9da4898ee4859825404f507969f57113c04ca0060e152b95c9afd73934126ad + url: "https://pub.dev" source: hosted version: "1.4.0" clock: dependency: transitive description: name: clock - url: "https://pub.dartlang.org" + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" source: hosted version: "1.1.1" code_builder: dependency: transitive description: name: code_builder - url: "https://pub.dartlang.org" + sha256: "0d43dd1288fd145de1ecc9a3948ad4a6d5a82f0a14c4fdd0892260787d975cbe" + url: "https://pub.dev" source: hosted version: "4.4.0" collection: dependency: "direct main" description: name: collection - url: "https://pub.dartlang.org" + sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0 + url: "https://pub.dev" source: hosted - version: "1.16.0" + version: "1.17.0" convert: dependency: transitive description: name: convert - url: "https://pub.dartlang.org" + sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + url: "https://pub.dev" source: hosted version: "3.1.1" cross_file: dependency: transitive description: name: cross_file - url: "https://pub.dartlang.org" + sha256: "0b0036e8cccbfbe0555fd83c1d31a6f30b77a96b598b35a5d36dd41f718695e9" + url: "https://pub.dev" source: hosted version: "0.3.3+4" crypto: dependency: transitive description: name: crypto - url: "https://pub.dartlang.org" + sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67 + url: "https://pub.dev" source: hosted version: "3.0.2" csslib: dependency: transitive description: name: csslib - url: "https://pub.dartlang.org" + sha256: b36c7f7e24c0bdf1bf9a3da461c837d1de64b9f8beb190c9011d8c72a3dfd745 + url: "https://pub.dev" source: hosted version: "0.17.2" cupertino_icons: dependency: "direct main" description: name: cupertino_icons - url: "https://pub.dartlang.org" + sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be + url: "https://pub.dev" source: hosted version: "1.0.5" dart_style: dependency: transitive description: name: dart_style - url: "https://pub.dartlang.org" + sha256: "7a03456c3490394c8e7665890333e91ae8a49be43542b616e414449ac358acd4" + url: "https://pub.dev" source: hosted version: "2.2.4" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.dartlang.org" + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" source: hosted version: "1.3.1" ffi: dependency: transitive description: name: ffi - url: "https://pub.dartlang.org" + sha256: a38574032c5f1dd06c4aee541789906c12ccaab8ba01446e800d9c5b79c4a978 + url: "https://pub.dev" source: hosted version: "2.0.1" file: dependency: transitive description: name: file - url: "https://pub.dartlang.org" + sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" + url: "https://pub.dev" source: hosted version: "6.1.4" fixnum: dependency: transitive description: name: fixnum - url: "https://pub.dartlang.org" + sha256: "04be3e934c52e082558cc9ee21f42f5c1cd7a1262f4c63cd0357c08d5bba81ec" + url: "https://pub.dev" source: hosted version: "1.0.1" flutter: @@ -277,14 +314,16 @@ packages: dependency: "direct main" description: name: flutter_markdown - url: "https://pub.dartlang.org" + sha256: "7b25c10de1fea883f3c4f9b8389506b54053cd00807beab69fd65c8653a2711f" + url: "https://pub.dev" source: hosted version: "0.6.14" flutter_plugin_android_lifecycle: dependency: transitive description: name: flutter_plugin_android_lifecycle - url: "https://pub.dartlang.org" + sha256: "60fc7b78455b94e6de2333d2f95196d32cf5c22f4b0b0520a628804cb463503b" + url: "https://pub.dev" source: hosted version: "2.0.7" flutter_test: @@ -301,301 +340,344 @@ packages: dependency: transitive description: name: frontend_server_client - url: "https://pub.dartlang.org" + sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" + url: "https://pub.dev" source: hosted version: "3.2.0" glob: dependency: transitive description: name: glob - url: "https://pub.dartlang.org" + sha256: "4515b5b6ddb505ebdd242a5f2cc5d22d3d6a80013789debfbda7777f47ea308c" + url: "https://pub.dev" source: hosted version: "2.1.1" graphs: dependency: transitive description: name: graphs - url: "https://pub.dartlang.org" + sha256: f9e130f3259f52d26f0cfc0e964513796dafed572fa52e45d2f8d6ca14db39b2 + url: "https://pub.dev" source: hosted version: "2.2.0" html: dependency: transitive description: name: html - url: "https://pub.dartlang.org" + sha256: d9793e10dbe0e6c364f4c59bf3e01fb33a9b2a674bc7a1081693dba0614b6269 + url: "https://pub.dev" source: hosted version: "0.15.1" http: dependency: transitive description: name: http - url: "https://pub.dartlang.org" + sha256: "6aa2946395183537c8b880962d935877325d6a09a2867c3970c05c0fed6ac482" + url: "https://pub.dev" source: hosted version: "0.13.5" http_multi_server: dependency: transitive description: name: http_multi_server - url: "https://pub.dartlang.org" + sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" + url: "https://pub.dev" source: hosted version: "3.2.1" http_parser: dependency: transitive description: name: http_parser - url: "https://pub.dartlang.org" + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" source: hosted version: "4.0.2" image_picker: dependency: "direct main" description: name: image_picker - url: "https://pub.dartlang.org" + sha256: f98d76672d309c8b7030c323b3394669e122d52b307d2bbd8d06bd70f5b2aabe + url: "https://pub.dev" source: hosted version: "0.8.6+1" image_picker_android: dependency: transitive description: name: image_picker_android - url: "https://pub.dartlang.org" + sha256: "385f12ee9c7288575572c7873a332016ec45ebd092e1c2f6bd421b4a9ad21f1d" + url: "https://pub.dev" source: hosted version: "0.8.5+6" image_picker_for_web: dependency: transitive description: name: image_picker_for_web - url: "https://pub.dartlang.org" + sha256: "7d319fb74955ca46d9bf7011497860e3923bb67feebcf068f489311065863899" + url: "https://pub.dev" source: hosted version: "2.1.10" image_picker_ios: dependency: transitive description: name: image_picker_ios - url: "https://pub.dartlang.org" + sha256: "8ffb14b43713d7c43fb21299cc18181cc5b39bd3ea1cc427a085c6400fe5aa52" + url: "https://pub.dev" source: hosted version: "0.8.6+7" image_picker_platform_interface: dependency: transitive description: name: image_picker_platform_interface - url: "https://pub.dartlang.org" + sha256: "7cef2f28f4f2fef99180f636c3d446b4ccbafd6ba0fad2adc9a80c4040f656b8" + url: "https://pub.dev" source: hosted version: "2.6.2" intl: dependency: "direct main" description: name: intl - url: "https://pub.dartlang.org" + sha256: a3715e3bc90294e971cb7dc063fbf3cd9ee0ebf8604ffeafabd9e6f16abbdbe6 + url: "https://pub.dev" source: hosted version: "0.18.0" io: dependency: transitive description: name: io - url: "https://pub.dartlang.org" + sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" + url: "https://pub.dev" source: hosted version: "1.0.4" js: dependency: transitive description: name: js - url: "https://pub.dartlang.org" + sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7" + url: "https://pub.dev" source: hosted - version: "0.6.4" + version: "0.6.5" json_annotation: dependency: "direct main" description: name: json_annotation - url: "https://pub.dartlang.org" + sha256: c33da08e136c3df0190bd5bbe51ae1df4a7d96e7954d1d7249fea2968a72d317 + url: "https://pub.dev" source: hosted version: "4.8.0" json_serializable: dependency: "direct dev" description: name: json_serializable - url: "https://pub.dartlang.org" + sha256: dadc08bd61f72559f938dd08ec20dbfec6c709bba83515085ea943d2078d187a + url: "https://pub.dev" source: hosted version: "6.6.1" logging: dependency: transitive description: name: logging - url: "https://pub.dartlang.org" + sha256: "04094f2eb032cbb06c6f6e8d3607edcfcb0455e2bb6cbc010cb01171dcb64e6d" + url: "https://pub.dev" source: hosted version: "1.1.1" lottie: dependency: "direct main" description: name: lottie - url: "https://pub.dartlang.org" + sha256: "49bbc544e44bf0c734ccda29b182e3516a12f5021ea98b206cf31a168b0f97da" + url: "https://pub.dev" source: hosted version: "2.2.0" markdown: dependency: transitive description: name: markdown - url: "https://pub.dartlang.org" + sha256: "4ed544d2ce84975b2ab5cbd4268f2d31f47858553ae2295c92fdf5d6e431a927" + url: "https://pub.dev" source: hosted version: "7.0.0" matcher: dependency: transitive description: name: matcher - url: "https://pub.dartlang.org" + sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72" + url: "https://pub.dev" source: hosted - version: "0.12.12" + version: "0.12.13" material_color_utilities: dependency: transitive description: name: material_color_utilities - url: "https://pub.dartlang.org" + sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 + url: "https://pub.dev" source: hosted - version: "0.1.5" + version: "0.2.0" meta: dependency: transitive description: name: meta - url: "https://pub.dartlang.org" + sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42" + url: "https://pub.dev" source: hosted version: "1.8.0" mime: dependency: transitive description: name: mime - url: "https://pub.dartlang.org" + sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e + url: "https://pub.dev" source: hosted version: "1.0.4" nested: dependency: transitive description: name: nested - url: "https://pub.dartlang.org" + sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20" + url: "https://pub.dev" source: hosted version: "1.0.0" package_config: dependency: transitive description: name: package_config - url: "https://pub.dartlang.org" + sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + url: "https://pub.dev" source: hosted version: "2.1.0" path: dependency: transitive description: name: path - url: "https://pub.dartlang.org" + sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b + url: "https://pub.dev" source: hosted version: "1.8.2" path_provider: dependency: transitive description: name: path_provider - url: "https://pub.dartlang.org" + sha256: dcea5feb97d8abf90cab9e9030b497fb7c3cbf26b7a1fe9e3ef7dcb0a1ddec95 + url: "https://pub.dev" source: hosted version: "2.0.12" path_provider_android: dependency: transitive description: name: path_provider_android - url: "https://pub.dartlang.org" + sha256: a776c088d671b27f6e3aa8881d64b87b3e80201c64e8869b811325de7a76c15e + url: "https://pub.dev" source: hosted version: "2.0.22" path_provider_foundation: dependency: transitive description: name: path_provider_foundation - url: "https://pub.dartlang.org" + sha256: "62a68e7e1c6c459f9289859e2fae58290c981ce21d1697faf54910fe1faa4c74" + url: "https://pub.dev" source: hosted version: "2.1.1" path_provider_linux: dependency: transitive description: name: path_provider_linux - url: "https://pub.dartlang.org" + sha256: "2e32f1640f07caef0d3cb993680f181c79e54a3827b997d5ee221490d131fbd9" + url: "https://pub.dev" source: hosted version: "2.1.8" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface - url: "https://pub.dartlang.org" + sha256: f0abc8ebd7253741f05488b4813d936b4d07c6bae3e86148a09e342ee4b08e76 + url: "https://pub.dev" source: hosted version: "2.0.5" path_provider_windows: dependency: transitive description: name: path_provider_windows - url: "https://pub.dartlang.org" + sha256: bcabbe399d4042b8ee687e17548d5d3f527255253b4a639f5f8d2094a9c2b45c + url: "https://pub.dev" source: hosted version: "2.1.3" platform: dependency: transitive description: name: platform - url: "https://pub.dartlang.org" + sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76" + url: "https://pub.dev" source: hosted version: "3.1.0" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - url: "https://pub.dartlang.org" + sha256: dbf0f707c78beedc9200146ad3cb0ab4d5da13c246336987be6940f026500d3a + url: "https://pub.dev" source: hosted version: "2.1.3" pointycastle: dependency: transitive description: name: pointycastle - url: "https://pub.dartlang.org" + sha256: db7306cf0249f838d1a24af52b5a5887c5bf7f31d8bb4e827d071dc0939ad346 + url: "https://pub.dev" source: hosted version: "3.6.2" pool: dependency: transitive description: name: pool - url: "https://pub.dartlang.org" + sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" + url: "https://pub.dev" source: hosted version: "1.5.1" process: dependency: transitive description: name: process - url: "https://pub.dartlang.org" + sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09" + url: "https://pub.dev" source: hosted version: "4.2.4" provider: dependency: transitive description: name: provider - url: "https://pub.dartlang.org" + sha256: cdbe7530b12ecd9eb455bdaa2fcb8d4dad22e80b8afb4798b41479d5ce26847f + url: "https://pub.dev" source: hosted version: "6.0.5" pub_semver: dependency: transitive description: name: pub_semver - url: "https://pub.dartlang.org" + sha256: "307de764d305289ff24ad257ad5c5793ce56d04947599ad68b3baa124105fc17" + url: "https://pub.dev" source: hosted version: "2.1.3" pubspec_parse: dependency: transitive description: name: pubspec_parse - url: "https://pub.dartlang.org" + sha256: "75f6614d6dde2dc68948dffbaa4fe5dae32cd700eb9fb763fe11dfb45a3c4d0a" + url: "https://pub.dev" source: hosted version: "1.2.1" shelf: dependency: transitive description: name: shelf - url: "https://pub.dartlang.org" + sha256: c24a96135a2ccd62c64b69315a14adc5c3419df63b4d7c05832a346fdb73682c + url: "https://pub.dev" source: hosted version: "1.4.0" shelf_web_socket: dependency: transitive description: name: shelf_web_socket - url: "https://pub.dartlang.org" + sha256: a988c0e8d8ffbdb8a28aa7ec8e449c260f3deb808781fe1284d22c5bba7156e8 + url: "https://pub.dev" source: hosted version: "1.0.3" sky_engine: @@ -607,77 +689,88 @@ packages: dependency: transitive description: name: source_gen - url: "https://pub.dartlang.org" + sha256: c2bea18c95cfa0276a366270afaa2850b09b4a76db95d546f3d003dcc7011298 + url: "https://pub.dev" source: hosted version: "1.2.7" source_helper: dependency: transitive description: name: source_helper - url: "https://pub.dartlang.org" + sha256: "3b67aade1d52416149c633ba1bb36df44d97c6b51830c2198e934e3fca87ca1f" + url: "https://pub.dev" source: hosted version: "1.3.3" source_span: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 + url: "https://pub.dev" source: hosted - version: "1.9.0" + version: "1.9.1" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.dartlang.org" + sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.11.0" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.dartlang.org" + sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" stream_transform: dependency: transitive description: name: stream_transform - url: "https://pub.dartlang.org" + sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" + url: "https://pub.dev" source: hosted version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.2.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.1" test_api: dependency: transitive description: name: test_api - url: "https://pub.dartlang.org" + sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206 + url: "https://pub.dev" source: hosted - version: "0.4.12" + version: "0.4.16" timing: dependency: transitive description: name: timing - url: "https://pub.dartlang.org" + sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32" + url: "https://pub.dev" source: hosted version: "1.0.1" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.dartlang.org" + sha256: "26f87ade979c47a150c9eaab93ccd2bebe70a27dc0b4b29517f2904f04eb11a5" + url: "https://pub.dev" source: hosted version: "1.3.1" universal_html: @@ -700,16 +793,18 @@ packages: dependency: "direct main" description: name: uuid - url: "https://pub.dartlang.org" + sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + url: "https://pub.dev" source: hosted version: "3.0.7" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.dartlang.org" + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.4" video_player: dependency: "direct main" description: @@ -722,107 +817,122 @@ packages: dependency: transitive description: name: video_player_android - url: "https://pub.dartlang.org" + sha256: "984388511230bac63feb53b2911a70e829fe0976b6b2213f5c579c4e0a882db3" + url: "https://pub.dev" source: hosted version: "2.3.10" video_player_avfoundation: dependency: transitive description: name: video_player_avfoundation - url: "https://pub.dartlang.org" + sha256: d9f7a46d6a77680adb03ec05a381025d6e890ebe636637c6c3014cc3926b97e9 + url: "https://pub.dev" source: hosted version: "2.3.8" video_player_platform_interface: dependency: transitive description: name: video_player_platform_interface - url: "https://pub.dartlang.org" + sha256: "42bb75de5e9b79e1f20f1d95f688fac0f95beac4d89c6eb2cd421724d4432dae" + url: "https://pub.dev" source: hosted version: "6.0.1" video_player_web: dependency: transitive description: name: video_player_web - url: "https://pub.dartlang.org" + sha256: b649b07b8f8f553bee4a97a0a53d0fe78a70b115eafaf0105b612b32b05ddb99 + url: "https://pub.dev" source: hosted version: "2.0.13" visibility_detector: dependency: "direct main" description: name: visibility_detector - url: "https://pub.dartlang.org" + sha256: "15c54a459ec2c17b4705450483f3d5a2858e733aee893dcee9d75fd04814940d" + url: "https://pub.dev" source: hosted version: "0.3.3" wakelock: dependency: transitive description: name: wakelock - url: "https://pub.dartlang.org" + sha256: "769ecf42eb2d07128407b50cb93d7c10bd2ee48f0276ef0119db1d25cc2f87db" + url: "https://pub.dev" source: hosted version: "0.6.2" wakelock_macos: dependency: transitive description: name: wakelock_macos - url: "https://pub.dartlang.org" + sha256: "047c6be2f88cb6b76d02553bca5a3a3b95323b15d30867eca53a19a0a319d4cd" + url: "https://pub.dev" source: hosted version: "0.4.0" wakelock_platform_interface: dependency: transitive description: name: wakelock_platform_interface - url: "https://pub.dartlang.org" + sha256: "1f4aeb81fb592b863da83d2d0f7b8196067451e4df91046c26b54a403f9de621" + url: "https://pub.dev" source: hosted version: "0.3.0" wakelock_web: dependency: transitive description: name: wakelock_web - url: "https://pub.dartlang.org" + sha256: "1b256b811ee3f0834888efddfe03da8d18d0819317f20f6193e2922b41a501b5" + url: "https://pub.dev" source: hosted version: "0.4.0" wakelock_windows: dependency: transitive description: name: wakelock_windows - url: "https://pub.dartlang.org" + sha256: "857f77b3fe6ae82dd045455baa626bc4b93cb9bb6c86bf3f27c182167c3a5567" + url: "https://pub.dev" source: hosted version: "0.2.1" watcher: dependency: transitive description: name: watcher - url: "https://pub.dartlang.org" + sha256: "6a7f46926b01ce81bfc339da6a7f20afbe7733eff9846f6d6a5466aa4c6667c0" + url: "https://pub.dev" source: hosted version: "1.0.2" web_socket_channel: dependency: transitive description: name: web_socket_channel - url: "https://pub.dartlang.org" + sha256: ca49c0bc209c687b887f30527fb6a9d80040b072cc2990f34b9bec3e7663101b + url: "https://pub.dev" source: hosted version: "2.3.0" win32: dependency: transitive description: name: win32 - url: "https://pub.dartlang.org" + sha256: c9ebe7ee4ab0c2194e65d3a07d8c54c5d00bb001b76081c4a04cdb8448b59e46 + url: "https://pub.dev" source: hosted version: "3.1.3" xdg_directories: dependency: transitive description: name: xdg_directories - url: "https://pub.dartlang.org" + sha256: ee1505df1426458f7f60aac270645098d318a8b4766d85fde75f76f2e21807d1 + url: "https://pub.dev" source: hosted version: "1.0.0" yaml: dependency: transitive description: name: yaml - url: "https://pub.dartlang.org" + sha256: "23812a9b125b48d4007117254bca50abb6c712352927eece9e155207b1db2370" + url: "https://pub.dev" source: hosted version: "3.1.1" sdks: - dart: ">=2.19.0 <3.0.0" + dart: ">=2.18.0 <3.0.0" flutter: ">=3.3.0" From 622c8b66f33e4716cf3a7307f83fee10b522c0c6 Mon Sep 17 00:00:00 2001 From: Rinzin Wangchuk Date: Tue, 28 Mar 2023 13:39:43 +0200 Subject: [PATCH 4/6] fix lint issues --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index e275a034..e6b6cdac 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -21,8 +21,8 @@ dependencies: intl: ^0.18.0 json_annotation: ^4.0.1 lottie: ^2.1.0 - uuid: ^3.0.4 universal_html: ^2.2.1 + uuid: ^3.0.4 video_player: ^2.6.0 visibility_detector: ^0.3.3 From d4123a83375002f578860f5289f76caef2902793 Mon Sep 17 00:00:00 2001 From: Rinzin Wangchuk Date: Tue, 28 Mar 2023 17:48:14 +0200 Subject: [PATCH 5/6] show loader for web video player --- lib/src/widget/web_video_player.dart | 43 +++++++++++++++++++--------- 1 file changed, 30 insertions(+), 13 deletions(-) diff --git a/lib/src/widget/web_video_player.dart b/lib/src/widget/web_video_player.dart index 6e5911a0..aec0949c 100644 --- a/lib/src/widget/web_video_player.dart +++ b/lib/src/widget/web_video_player.dart @@ -31,6 +31,8 @@ class WebVideoPlayer extends StatefulWidget { class _WebVideoPlayerState extends State { late final html.VideoElement video; + bool _isVideoLoaded = false; + @override void initState() { super.initState(); @@ -49,7 +51,15 @@ class _WebVideoPlayerState extends State { // Allows Safari iOS to play the video inline // ignore: cascade_invocations - ..setAttribute('playsinline', 'true'); + ..setAttribute('playsinline', 'true') + ..addEventListener( + 'canplaythrough', + (_) { + setState(() { + _isVideoLoaded = true; + }); + }, + ); platformViewRegistry.registerViewFactory( widget.src, @@ -65,17 +75,24 @@ class _WebVideoPlayerState extends State { @override Widget build(BuildContext context) { - return AspectRatio( - aspectRatio: widget.aspectRatio, - child: VisibilityDetector( - key: Key(widget.src), - onVisibilityChanged: (info) { - if (info.visibleFraction == 0 && mounted) { - video.pause(); - } - }, - child: HtmlElementView(viewType: widget.src), - ), - ); + return _isVideoLoaded + ? AspectRatio( + aspectRatio: widget.aspectRatio, + child: VisibilityDetector( + key: Key(widget.src), + onVisibilityChanged: (info) { + if (info.visibleFraction == 0 && mounted) { + video.pause(); + } + }, + child: HtmlElementView(viewType: widget.src), + ), + ) + : Container( + height: 200, + child: const Center( + child: CircularProgressIndicator.adaptive(), + ), + ); } } From 2e0fec45aa2d0d86f64baec53c45b391c1c9d553 Mon Sep 17 00:00:00 2001 From: Rinzin Wangchuk Date: Wed, 29 Mar 2023 10:00:23 +0200 Subject: [PATCH 6/6] fix web video player not being disposed --- lib/src/view/widget/content/video_widget.dart | 2 - lib/src/widget/web_video_player.dart | 93 ++++++++----------- 2 files changed, 38 insertions(+), 57 deletions(-) diff --git a/lib/src/view/widget/content/video_widget.dart b/lib/src/view/widget/content/video_widget.dart index d8dbd85c..2aac2390 100644 --- a/lib/src/view/widget/content/video_widget.dart +++ b/lib/src/view/widget/content/video_widget.dart @@ -14,8 +14,6 @@ class VideoWidget extends StatelessWidget { @override Widget build(BuildContext context) { - if (kIsWeb) return WebVideoPlayer(videoContent.url); - final widget = kIsWeb ? WebVideoPlayer(videoContent.url) : SurveyKitVideoPlayer( diff --git a/lib/src/widget/web_video_player.dart b/lib/src/widget/web_video_player.dart index aec0949c..6053cae2 100644 --- a/lib/src/widget/web_video_player.dart +++ b/lib/src/widget/web_video_player.dart @@ -1,7 +1,6 @@ import 'package:flutter/material.dart'; import 'package:survey_kit/src/widget/platform_view_registry/platform_view_registry.dart'; import 'package:universal_html/html.dart' as html; -import 'package:visibility_detector/visibility_detector.dart'; // TODO(rinzin): Temporary fix for web until // [https://github.com/fluttercommunity/chewie/issues/688] @@ -29,70 +28,54 @@ class WebVideoPlayer extends StatefulWidget { } class _WebVideoPlayerState extends State { - late final html.VideoElement video; - - bool _isVideoLoaded = false; - + bool isLoaded = false; @override void initState() { super.initState(); - final url = '${widget.src}' '#t=${widget.startAt}'; - - video = html.VideoElement() - ..src = url - ..autoplay = widget.autoplay - ..controls = widget.controls - ..style.border = 'none' - ..style.height = '100%' - ..style.width = '100%' + platformViewRegistry.registerViewFactory( + widget.src, + (int viewId) { + final url = '${widget.src}' '#t=${widget.startAt}'; + final video = html.VideoElement() + ..src = url + ..autoplay = widget.autoplay + ..controls = widget.controls + ..style.border = 'none' + ..style.height = '100%' + ..style.width = '100%' - //Remove the download option from controls - ..setAttribute('controlsList', 'nodownload') + //Remove the download option from controls + ..setAttribute('controlsList', 'nodownload') - // Allows Safari iOS to play the video inline - // ignore: cascade_invocations - ..setAttribute('playsinline', 'true') - ..addEventListener( - 'canplaythrough', - (_) { - setState(() { - _isVideoLoaded = true; - }); - }, - ); + // Allows Safari iOS to play the video inline + // ignore: cascade_invocations + ..setAttribute('playsinline', 'true'); - platformViewRegistry.registerViewFactory( - widget.src, - (int viewId) => video, + return video; + }, ); } - @override - void dispose() { - video.remove(); - super.dispose(); - } - @override Widget build(BuildContext context) { - return _isVideoLoaded - ? AspectRatio( - aspectRatio: widget.aspectRatio, - child: VisibilityDetector( - key: Key(widget.src), - onVisibilityChanged: (info) { - if (info.visibleFraction == 0 && mounted) { - video.pause(); - } - }, - child: HtmlElementView(viewType: widget.src), - ), - ) - : Container( - height: 200, - child: const Center( - child: CircularProgressIndicator.adaptive(), - ), - ); + return Stack( + children: [ + AspectRatio( + aspectRatio: widget.aspectRatio, + child: HtmlElementView( + onPlatformViewCreated: (id) { + setState(() { + isLoaded = true; + }); + }, + viewType: widget.src, + ), + ), + if (!isLoaded) + const Center( + child: CircularProgressIndicator.adaptive(), + ), + ], + ); } }