diff --git a/analysis_options.yaml b/analysis_options.yaml index 8b75c99..75d81b2 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -20,3 +20,4 @@ linter: prefer_relative_imports: true avoid_relative_lib_imports: false always_use_package_imports: false + avoid_dynamic_calls: false diff --git a/lib/src/reverse_engineering/pages/channel_page.dart b/lib/src/reverse_engineering/pages/channel_page.dart index c892717..892b2b9 100644 --- a/lib/src/reverse_engineering/pages/channel_page.dart +++ b/lib/src/reverse_engineering/pages/channel_page.dart @@ -1,5 +1,4 @@ import 'package:html/parser.dart' as parser; -import 'package:http/http.dart'; import '../../exceptions/exceptions.dart'; import '../../extensions/helpers_extension.dart'; diff --git a/lib/src/search/search_channel.dart b/lib/src/search/search_channel.dart index faa8f81..2bee64d 100644 --- a/lib/src/search/search_channel.dart +++ b/lib/src/search/search_channel.dart @@ -9,7 +9,7 @@ part 'search_channel.freezed.dart'; @freezed class SearchChannel with _$SearchChannel, BaseSearchContent { /// Initialize a [SearchChannel] instance. - @With() + //@With() const factory SearchChannel( /// Channel id. diff --git a/lib/src/search/search_channel.freezed.dart b/lib/src/search/search_channel.freezed.dart index c406462..b456ebe 100644 --- a/lib/src/search/search_channel.freezed.dart +++ b/lib/src/search/search_channel.freezed.dart @@ -160,8 +160,7 @@ class __$SearchChannelCopyWithImpl<$Res> /// @nodoc -@With() -class _$_SearchChannel with BaseSearchContent implements _SearchChannel { +class _$_SearchChannel implements _SearchChannel { const _$_SearchChannel(this.id, this.name, this.description, this.videoCount); @override @@ -214,7 +213,7 @@ class _$_SearchChannel with BaseSearchContent implements _SearchChannel { __$SearchChannelCopyWithImpl<_SearchChannel>(this, _$identity); } -abstract class _SearchChannel implements SearchChannel, BaseSearchContent { +abstract class _SearchChannel implements SearchChannel { const factory _SearchChannel( ChannelId id, String name, String description, int videoCount) = _$_SearchChannel; diff --git a/lib/src/search/search_playlist.dart b/lib/src/search/search_playlist.dart index 8f4c85c..a4d3a28 100644 --- a/lib/src/search/search_playlist.dart +++ b/lib/src/search/search_playlist.dart @@ -10,7 +10,7 @@ part 'search_playlist.freezed.dart'; @freezed class SearchPlaylist with _$SearchPlaylist, BaseSearchContent { /// Initialize a [SearchPlaylist] instance. - @With() + //@With() const factory SearchPlaylist( /// PlaylistId. diff --git a/lib/src/search/search_playlist.freezed.dart b/lib/src/search/search_playlist.freezed.dart index 50faadf..0da556f 100644 --- a/lib/src/search/search_playlist.freezed.dart +++ b/lib/src/search/search_playlist.freezed.dart @@ -167,8 +167,7 @@ class __$SearchPlaylistCopyWithImpl<$Res> /// @nodoc -@With() -class _$_SearchPlaylist with BaseSearchContent implements _SearchPlaylist { +class _$_SearchPlaylist implements _SearchPlaylist { const _$_SearchPlaylist(this.playlistId, this.playlistTitle, this.playlistVideoCount, this.thumbnails); @@ -223,7 +222,7 @@ class _$_SearchPlaylist with BaseSearchContent implements _SearchPlaylist { __$SearchPlaylistCopyWithImpl<_SearchPlaylist>(this, _$identity); } -abstract class _SearchPlaylist implements SearchPlaylist, BaseSearchContent { +abstract class _SearchPlaylist implements SearchPlaylist { const factory _SearchPlaylist(PlaylistId playlistId, String playlistTitle, int playlistVideoCount, List thumbnails) = _$_SearchPlaylist; diff --git a/lib/src/search/search_video.dart b/lib/src/search/search_video.dart index 5f241ff..d78d938 100644 --- a/lib/src/search/search_video.dart +++ b/lib/src/search/search_video.dart @@ -10,7 +10,7 @@ part 'search_video.freezed.dart'; @freezed class SearchVideo with _$SearchVideo, BaseSearchContent { /// Initialize a [SearchVideo] instance. - @With() + //@With() const factory SearchVideo( /// Video ID. VideoId id, diff --git a/lib/src/search/search_video.freezed.dart b/lib/src/search/search_video.freezed.dart index 37bafdc..641c5ac 100644 --- a/lib/src/search/search_video.freezed.dart +++ b/lib/src/search/search_video.freezed.dart @@ -271,8 +271,7 @@ class __$SearchVideoCopyWithImpl<$Res> extends _$SearchVideoCopyWithImpl<$Res> /// @nodoc -@With() -class _$_SearchVideo with BaseSearchContent implements _SearchVideo { +class _$_SearchVideo implements _SearchVideo { const _$_SearchVideo( this.id, this.title, @@ -372,7 +371,7 @@ class _$_SearchVideo with BaseSearchContent implements _SearchVideo { __$SearchVideoCopyWithImpl<_SearchVideo>(this, _$identity); } -abstract class _SearchVideo implements SearchVideo, BaseSearchContent { +abstract class _SearchVideo implements SearchVideo { const factory _SearchVideo( VideoId id, String title, diff --git a/lib/src/videos/streams/bitrate.dart b/lib/src/videos/streams/bitrate.dart index 5351f4e..49cb247 100644 --- a/lib/src/videos/streams/bitrate.dart +++ b/lib/src/videos/streams/bitrate.dart @@ -16,7 +16,7 @@ class Bitrate with Comparable, _$Bitrate { double get gigaBitsPerSecond => megaBitsPerSecond / 1024; /// Initializes an instance of [Bitrate] - @With>() + //@With>() const factory Bitrate( /// Bits per second. diff --git a/lib/src/videos/streams/bitrate.freezed.dart b/lib/src/videos/streams/bitrate.freezed.dart index b98b8cf..53b77f7 100644 --- a/lib/src/videos/streams/bitrate.freezed.dart +++ b/lib/src/videos/streams/bitrate.freezed.dart @@ -106,8 +106,7 @@ class __$BitrateCopyWithImpl<$Res> extends _$BitrateCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -@With>() -class _$_Bitrate extends _Bitrate with Comparable { +class _$_Bitrate extends _Bitrate { const _$_Bitrate(this.bitsPerSecond) : super._(); factory _$_Bitrate.fromJson(Map json) => @@ -142,7 +141,7 @@ class _$_Bitrate extends _Bitrate with Comparable { } } -abstract class _Bitrate extends Bitrate implements Comparable { +abstract class _Bitrate extends Bitrate { const factory _Bitrate(int bitsPerSecond) = _$_Bitrate; const _Bitrate._() : super._(); diff --git a/lib/src/videos/streams/filesize.dart b/lib/src/videos/streams/filesize.dart index c94001d..1cdced1 100644 --- a/lib/src/videos/streams/filesize.dart +++ b/lib/src/videos/streams/filesize.dart @@ -16,7 +16,7 @@ class FileSize with Comparable, _$FileSize { double get totalGigaBytes => totalMegaBytes / 1024; /// Initializes an instance of [FileSize] - @With>() + //@With>() const factory FileSize( /// Total bytes. diff --git a/lib/src/videos/streams/filesize.freezed.dart b/lib/src/videos/streams/filesize.freezed.dart index 1af1517..909d310 100644 --- a/lib/src/videos/streams/filesize.freezed.dart +++ b/lib/src/videos/streams/filesize.freezed.dart @@ -107,8 +107,7 @@ class __$FileSizeCopyWithImpl<$Res> extends _$FileSizeCopyWithImpl<$Res> /// @nodoc @JsonSerializable() -@With>() -class _$_FileSize extends _FileSize with Comparable { +class _$_FileSize extends _FileSize { const _$_FileSize(this.totalBytes) : super._(); factory _$_FileSize.fromJson(Map json) => @@ -143,7 +142,7 @@ class _$_FileSize extends _FileSize with Comparable { } } -abstract class _FileSize extends FileSize implements Comparable { +abstract class _FileSize extends FileSize { const factory _FileSize(int totalBytes) = _$_FileSize; const _FileSize._() : super._(); diff --git a/test/streams_test.dart b/test/streams_test.dart index 9f8c41b..e4d5cd8 100644 --- a/test/streams_test.dart +++ b/test/streams_test.dart @@ -79,7 +79,7 @@ void main() { test('VideoId - ${val.value}', () async { var manifest = await yt!.videos.streamsClient.getManifest(val); for (final streamInfo in manifest.streams) { - print('Stream: ${streamInfo.tag}'); + // print('Stream: ${streamInfo.tag}'); expect(yt!.videos.streamsClient.get(streamInfo).first, completes); } }, timeout: const Timeout(Duration(minutes: 5)));