From 53e16e26e2cc8a36667edf543f8b1c0056bb8de8 Mon Sep 17 00:00:00 2001 From: suragch Date: Thu, 21 Jan 2021 18:32:03 +0800 Subject: [PATCH] version 0.2.0-nullsafety.0 --- .gitignore | 4 ++ CHANGELOG.md | 4 ++ example/ios/Podfile.lock | 34 ++++++++++ example/ios/Runner.xcodeproj/project.pbxproj | 68 +++++++++++++++++++ .../contents.xcworkspacedata | 3 + example/lib/main.dart | 1 - example/pubspec.lock | 57 +++++++++------- lib/audio_video_progress_bar.dart | 64 ++++++++--------- pubspec.lock | 45 ++++++------ pubspec.yaml | 5 +- test/audio_video_progress_bar_test.dart | 19 ++++-- 11 files changed, 219 insertions(+), 85 deletions(-) create mode 100644 example/ios/Podfile.lock diff --git a/.gitignore b/.gitignore index 1985397..68b907c 100644 --- a/.gitignore +++ b/.gitignore @@ -72,3 +72,7 @@ build/ !**/ios/**/default.mode2v3 !**/ios/**/default.pbxuser !**/ios/**/default.perspectivev3 + +# Flutter version manager +.fvm/ +.vscode/settings.json \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 551c5f9..3dcc0ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## [0.2.0-nullsafety.0] - January 21, 2021 + +* Updated to null safety + ## [0.1.0] - December 30, 2020 * Initial release diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock new file mode 100644 index 0000000..ff94b43 --- /dev/null +++ b/example/ios/Podfile.lock @@ -0,0 +1,34 @@ +PODS: + - audio_session (0.0.1): + - Flutter + - Flutter (1.0.0) + - just_audio (0.0.1): + - Flutter + - path_provider (0.0.1): + - Flutter + +DEPENDENCIES: + - audio_session (from `.symlinks/plugins/audio_session/ios`) + - Flutter (from `Flutter`) + - just_audio (from `.symlinks/plugins/just_audio/ios`) + - path_provider (from `.symlinks/plugins/path_provider/ios`) + +EXTERNAL SOURCES: + audio_session: + :path: ".symlinks/plugins/audio_session/ios" + Flutter: + :path: Flutter + just_audio: + :path: ".symlinks/plugins/just_audio/ios" + path_provider: + :path: ".symlinks/plugins/path_provider/ios" + +SPEC CHECKSUMS: + audio_session: 4f3e461722055d21515cf3261b64c973c062f345 + Flutter: 434fef37c0980e73bb6479ef766c45957d4b510c + just_audio: baa7252489dbcf47a4c7cc9ca663e9661c99aafa + path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c + +PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c + +COCOAPODS: 1.10.1 diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj index 1aec2aa..2d14a6b 100644 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -8,6 +8,7 @@ /* Begin PBXBuildFile section */ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 27DB94429FB27BF2D65CEE10 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6E62CFF694FC3C9B6B5C1F1F /* Pods_Runner.framework */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; @@ -29,9 +30,12 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 0AA1CB2611AD734F1444320C /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 433D68CC5409DF89E211AF29 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + 6E62CFF694FC3C9B6B5C1F1F /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; @@ -42,6 +46,7 @@ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + E2DD64466D1E54B58C958DED /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -49,12 +54,32 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 27DB94429FB27BF2D65CEE10 /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 1B565FD2BFDB686CD176AE61 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 6E62CFF694FC3C9B6B5C1F1F /* Pods_Runner.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 4722BC0352090DF0FF36479D /* Pods */ = { + isa = PBXGroup; + children = ( + 0AA1CB2611AD734F1444320C /* Pods-Runner.debug.xcconfig */, + 433D68CC5409DF89E211AF29 /* Pods-Runner.release.xcconfig */, + E2DD64466D1E54B58C958DED /* Pods-Runner.profile.xcconfig */, + ); + name = Pods; + path = Pods; + sourceTree = ""; + }; 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( @@ -72,6 +97,8 @@ 9740EEB11CF90186004384FC /* Flutter */, 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, + 4722BC0352090DF0FF36479D /* Pods */, + 1B565FD2BFDB686CD176AE61 /* Frameworks */, ); sourceTree = ""; }; @@ -105,12 +132,14 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( + 566E6B20DBDF574A24C10567 /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + 499F978BBC538A078433A534 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -183,6 +212,45 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; }; + 499F978BBC538A078433A534 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 566E6B20DBDF574A24C10567 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; diff --git a/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/example/ios/Runner.xcworkspace/contents.xcworkspacedata index 1d526a1..21a3cc1 100644 --- a/example/ios/Runner.xcworkspace/contents.xcworkspacedata +++ b/example/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -4,4 +4,7 @@ + + diff --git a/example/lib/main.dart b/example/lib/main.dart index e1a86ac..61c381a 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -77,7 +77,6 @@ class _HomeWidgetState extends State { progress: progress, buffered: buffered, total: total, - timeLabelLocation: TimeLabelLocation.sides, onSeek: (duration) { _player.seek(duration); }, diff --git a/example/pubspec.lock b/example/pubspec.lock index a1ea850..677465a 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -7,56 +7,56 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.5.0-nullsafety.1" + version: "2.5.0-nullsafety.3" audio_session: dependency: transitive description: name: audio_session url: "https://pub.dartlang.org" source: hosted - version: "0.0.10" + version: "0.0.11" audio_video_progress_bar: dependency: "direct main" description: path: ".." relative: true source: path - version: "0.1.0" + version: "0.2.0-nullsafety.0" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.1" + version: "2.1.0-nullsafety.3" characters: dependency: transitive description: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.3" + version: "1.1.0-nullsafety.5" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0-nullsafety.3" clock: dependency: transitive description: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.1" + version: "1.1.0-nullsafety.3" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.15.0-nullsafety.3" + version: "1.15.0-nullsafety.5" convert: dependency: transitive description: @@ -77,7 +77,7 @@ packages: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0-nullsafety.3" ffi: dependency: transitive description: @@ -114,13 +114,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.16.1" + js: + dependency: transitive + description: + name: js + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.3-nullsafety.3" just_audio: dependency: "direct main" description: name: just_audio url: "https://pub.dartlang.org" source: hosted - version: "0.6.3" + version: "0.6.6" just_audio_platform_interface: dependency: transitive description: @@ -134,35 +141,35 @@ packages: name: just_audio_web url: "https://pub.dartlang.org" source: hosted - version: "0.2.1" + version: "0.2.2" matcher: dependency: transitive description: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.10-nullsafety.1" + version: "0.12.10-nullsafety.3" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.3.0-nullsafety.6" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.0-nullsafety.1" + version: "1.8.0-nullsafety.3" path_provider: dependency: transitive description: name: path_provider url: "https://pub.dartlang.org" source: hosted - version: "1.6.24" + version: "1.6.27" path_provider_linux: dependency: transitive description: @@ -176,7 +183,7 @@ packages: name: path_provider_macos url: "https://pub.dartlang.org" source: hosted - version: "0.0.4+6" + version: "0.0.4+8" path_provider_platform_interface: dependency: transitive description: @@ -230,49 +237,49 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.0-nullsafety.2" + version: "1.8.0-nullsafety.4" stack_trace: dependency: transitive description: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.10.0-nullsafety.1" + version: "1.10.0-nullsafety.6" stream_channel: dependency: transitive description: name: stream_channel url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.1" + version: "2.1.0-nullsafety.3" string_scanner: dependency: transitive description: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.1" + version: "1.1.0-nullsafety.3" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0-nullsafety.3" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.19-nullsafety.2" + version: "0.2.19-nullsafety.6" typed_data: dependency: transitive description: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.3.0-nullsafety.5" uuid: dependency: transitive description: @@ -286,7 +293,7 @@ packages: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.3" + version: "2.1.0-nullsafety.5" win32: dependency: transitive description: @@ -302,5 +309,5 @@ packages: source: hosted version: "0.1.2" sdks: - dart: ">=2.10.0-110 <2.11.0" + dart: ">=2.12.0-29.10.beta <3.0.0" flutter: ">=1.17.0 <2.0.0" diff --git a/lib/audio_video_progress_bar.dart b/lib/audio_video_progress_bar.dart index 690cabc..fdac98d 100644 --- a/lib/audio_video_progress_bar.dart +++ b/lib/audio_video_progress_bar.dart @@ -27,9 +27,9 @@ class ProgressBar extends LeafRenderObjectWidget { /// When a user drags the thumb to a new location you can be notified /// by the [onSeek] callback so that you can update your audio/video player. const ProgressBar({ - Key key, - @required this.progress, - @required this.total, + Key? key, + required this.progress, + required this.total, this.buffered, this.onSeek, this.barHeight = 5.0, @@ -53,7 +53,7 @@ class ProgressBar extends LeafRenderObjectWidget { /// /// This is useful for streamed content. If you are playing a local file /// then you can leave this out. - final Duration buffered; + final Duration? buffered; /// A callback when user moves the thumb. /// @@ -62,25 +62,25 @@ class ProgressBar extends LeafRenderObjectWidget { /// /// You will get the chosen duration to start playing at which you can pass /// on to your media player. - final ValueChanged onSeek; + final ValueChanged? onSeek; /// The color of the progress bar before playback has started. /// /// By default it is a transparent version of your theme's primary color. - final Color baseBarColor; + final Color? baseBarColor; /// The color of the progress bar to the left of the current playing /// [progress]. /// /// By default it is your theme's primary color. - final Color progressBarColor; + final Color? progressBarColor; /// The color of the progress bar between the [progress] location and the /// [buffered] location. /// /// By default it is a transparent version of your theme's primary color, /// a shade darker than [baseBarColor]. - final Color bufferedBarColor; + final Color? bufferedBarColor; /// The vertical thickness of the progress bar. final double barHeight; @@ -91,13 +91,13 @@ class ProgressBar extends LeafRenderObjectWidget { /// The color of the circle for the moveable progress bar thumb. /// /// By default it is your theme's primary color. - final Color thumbColor; + final Color? thumbColor; /// The location for the [progress] and [total] duration text labels. /// /// By default the labels appear under the progress bar but you can also /// put them on the sides or remove them altogether. - final TimeLabelLocation timeLabelLocation; + final TimeLabelLocation? timeLabelLocation; @override _RenderProgressBar createRenderObject(BuildContext context) { @@ -162,18 +162,18 @@ class ProgressBar extends LeafRenderObjectWidget { class _RenderProgressBar extends RenderBox { _RenderProgressBar({ - Duration progress, - Duration total, - Duration buffered, - ValueChanged onSeek, - double barHeight, - Color baseBarColor, - Color progressBarColor, - Color bufferedBarColor, + required Duration progress, + required Duration total, + required Duration buffered, + ValueChanged? onSeek, + required double barHeight, + required Color baseBarColor, + required Color progressBarColor, + required Color bufferedBarColor, double thumbRadius = 20.0, - Color thumbColor, - TimeLabelLocation timeLabelLocation, - TextStyle timeLabelTextStyle, + required Color thumbColor, + required TimeLabelLocation timeLabelLocation, + TextStyle? timeLabelTextStyle, }) : _progress = progress, _total = total, _buffered = buffered, @@ -196,7 +196,7 @@ class _RenderProgressBar extends RenderBox { } // This is the gesture recognizer used to move the thumb. - HorizontalDragGestureRecognizer _drag; + HorizontalDragGestureRecognizer? _drag; // This is a value between 0.0 and 1.0 used to indicate the position on // the bar. @@ -219,7 +219,7 @@ class _RenderProgressBar extends RenderBox { void _onDragEnd(DragEndDetails details) { final thumbMiliseconds = _thumbValue * total.inMilliseconds; - onSeek(Duration(milliseconds: thumbMiliseconds.round())); + onSeek?.call(Duration(milliseconds: thumbMiliseconds.round())); _finishDrag(); } @@ -254,7 +254,7 @@ class _RenderProgressBar extends RenderBox { /// This is used to update the thumb value and the left time label. Duration get progress => _progress; Duration _progress; - TextPainter _leftTimeLabel; + late TextPainter _leftTimeLabel; set progress(Duration value) { if (_progress == value) { return; @@ -286,7 +286,7 @@ class _RenderProgressBar extends RenderBox { /// The total time length of the media. Duration get total => _total; Duration _total; - TextPainter _rightTimeLabel; + late TextPainter _rightTimeLabel; set total(Duration value) { if (_total == value) { return; @@ -308,9 +308,9 @@ class _RenderProgressBar extends RenderBox { } /// A callback for the audio duration position to where the thumb was moved. - ValueChanged get onSeek => _onSeek; - ValueChanged _onSeek; - set onSeek(ValueChanged value) { + ValueChanged? get onSeek => _onSeek; + ValueChanged? _onSeek; + set onSeek(ValueChanged? value) { if (value == _onSeek) { return; } @@ -382,9 +382,9 @@ class _RenderProgressBar extends RenderBox { /// The text style for the duration text labels. By default this style is /// taken from the theme's [textStyle.bodyText1]. - TextStyle get timeLabelTextStyle => _timeLabelTextStyle; - TextStyle _timeLabelTextStyle; - set timeLabelTextStyle(TextStyle value) { + TextStyle? get timeLabelTextStyle => _timeLabelTextStyle; + TextStyle? _timeLabelTextStyle; + set timeLabelTextStyle(TextStyle? value) { if (_timeLabelTextStyle == value) return; _timeLabelTextStyle = value; markNeedsLayout(); @@ -412,7 +412,7 @@ class _RenderProgressBar extends RenderBox { void handleEvent(PointerEvent event, BoxHitTestEntry entry) { assert(debugHandleEvent(event, entry)); if (event is PointerDownEvent) { - _drag.addPointer(event); + _drag?.addPointer(event); } } diff --git a/pubspec.lock b/pubspec.lock index ed3ea9d..4dd8bc5 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -7,49 +7,49 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.5.0-nullsafety.1" + version: "2.5.0-nullsafety.3" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.1" + version: "2.1.0-nullsafety.3" characters: dependency: transitive description: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.3" + version: "1.1.0-nullsafety.5" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0-nullsafety.3" clock: dependency: transitive description: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.1" + version: "1.1.0-nullsafety.3" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.15.0-nullsafety.3" + version: "1.15.0-nullsafety.5" fake_async: dependency: transitive description: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0-nullsafety.3" flutter: dependency: "direct main" description: flutter @@ -66,21 +66,28 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.10-nullsafety.1" + version: "0.12.10-nullsafety.3" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.3.0-nullsafety.6" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.0-nullsafety.1" + version: "1.8.0-nullsafety.3" + pedantic: + dependency: "direct dev" + description: + name: pedantic + url: "https://pub.dartlang.org" + source: hosted + version: "1.10.0-nullsafety.3" sky_engine: dependency: transitive description: flutter @@ -92,56 +99,56 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.0-nullsafety.2" + version: "1.8.0-nullsafety.4" stack_trace: dependency: transitive description: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.10.0-nullsafety.1" + version: "1.10.0-nullsafety.6" stream_channel: dependency: transitive description: name: stream_channel url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.1" + version: "2.1.0-nullsafety.3" string_scanner: dependency: transitive description: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.1" + version: "1.1.0-nullsafety.3" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0-nullsafety.3" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.19-nullsafety.2" + version: "0.2.19-nullsafety.6" typed_data: dependency: transitive description: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.3.0-nullsafety.5" vector_math: dependency: transitive description: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.3" + version: "2.1.0-nullsafety.5" sdks: - dart: ">=2.10.0-110 <2.11.0" + dart: ">=2.12.0-29.10.beta <3.0.0" flutter: ">=1.17.0" diff --git a/pubspec.yaml b/pubspec.yaml index 336f2f9..ac9d6ab 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,10 +1,10 @@ name: audio_video_progress_bar description: A progress bar widget to show or change the position of an audio or video stream. -version: 0.1.0 +version: 0.2.0-nullsafety.0 homepage: https://github.com/suragch/audio_video_progress_bar environment: - sdk: ">=2.7.0 <3.0.0" + sdk: ">=2.12.0-29.10.beta <3.0.0" flutter: ">=1.17.0" dependencies: @@ -14,5 +14,6 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter + pedantic: ^1.10.0-nullsafety.3 flutter: diff --git a/test/audio_video_progress_bar_test.dart b/test/audio_video_progress_bar_test.dart index 84862b0..e8ed4ce 100644 --- a/test/audio_video_progress_bar_test.dart +++ b/test/audio_video_progress_bar_test.dart @@ -51,7 +51,8 @@ void main() { expect(progressBar.timeLabelLocation, TimeLabelLocation.sides); }); - testWidgets('TimeLabelLocation.below size correct', (WidgetTester tester) async { + testWidgets('TimeLabelLocation.below size correct', + (WidgetTester tester) async { await tester.pumpWidget( Center( child: ProgressBar( @@ -70,7 +71,8 @@ void main() { expect(baseSize.height, equals(34.0)); }); - testWidgets('TimeLabelLocation.sides size correct', (WidgetTester tester) async { + testWidgets('TimeLabelLocation.sides size correct', + (WidgetTester tester) async { await tester.pumpWidget( Center( child: ProgressBar( @@ -89,7 +91,8 @@ void main() { expect(baseSize.height, equals(20.0)); }); - testWidgets('TimeLabelLocation.none size correct', (WidgetTester tester) async { + testWidgets('TimeLabelLocation.none size correct', + (WidgetTester tester) async { await tester.pumpWidget( Center( child: ProgressBar( @@ -108,7 +111,8 @@ void main() { expect(baseSize.height, equals(20.0)); }); - testWidgets('ProgressBar default size is TimeLabelLocation.below', (WidgetTester tester) async { + testWidgets('ProgressBar default size is TimeLabelLocation.below', + (WidgetTester tester) async { await tester.pumpWidget( Center( child: ProgressBar( @@ -126,7 +130,8 @@ void main() { expect(baseSize.height, equals(34.0)); }); - testWidgets('Changing the thumb radius changes the widget size', (WidgetTester tester) async { + testWidgets('Changing the thumb radius changes the widget size', + (WidgetTester tester) async { await tester.pumpWidget( Center( child: ProgressBar( @@ -146,7 +151,9 @@ void main() { expect(baseSize.height, equals(60.0)); }); - testWidgets('The height is the max of the font and thumb radius for TimeLabelLocation.sides', (WidgetTester tester) async { + testWidgets( + 'The height is the max of the font and thumb radius for TimeLabelLocation.sides', + (WidgetTester tester) async { await tester.pumpWidget( Center( child: ProgressBar(