Remove @With annotation
This commit is contained in:
parent
bff709cf94
commit
968d750408
|
@ -20,3 +20,4 @@ linter:
|
|||
prefer_relative_imports: true
|
||||
avoid_relative_lib_imports: false
|
||||
always_use_package_imports: false
|
||||
avoid_dynamic_calls: false
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -9,7 +9,7 @@ part 'search_channel.freezed.dart';
|
|||
@freezed
|
||||
class SearchChannel with _$SearchChannel, BaseSearchContent {
|
||||
/// Initialize a [SearchChannel] instance.
|
||||
@With<BaseSearchContent>()
|
||||
//@With<BaseSearchContent>()
|
||||
const factory SearchChannel(
|
||||
|
||||
/// Channel id.
|
||||
|
|
|
@ -160,8 +160,7 @@ class __$SearchChannelCopyWithImpl<$Res>
|
|||
|
||||
/// @nodoc
|
||||
|
||||
@With<BaseSearchContent>()
|
||||
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;
|
||||
|
|
|
@ -10,7 +10,7 @@ part 'search_playlist.freezed.dart';
|
|||
@freezed
|
||||
class SearchPlaylist with _$SearchPlaylist, BaseSearchContent {
|
||||
/// Initialize a [SearchPlaylist] instance.
|
||||
@With<BaseSearchContent>()
|
||||
//@With<BaseSearchContent>()
|
||||
const factory SearchPlaylist(
|
||||
|
||||
/// PlaylistId.
|
||||
|
|
|
@ -167,8 +167,7 @@ class __$SearchPlaylistCopyWithImpl<$Res>
|
|||
|
||||
/// @nodoc
|
||||
|
||||
@With<BaseSearchContent>()
|
||||
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<Thumbnail> thumbnails) = _$_SearchPlaylist;
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ part 'search_video.freezed.dart';
|
|||
@freezed
|
||||
class SearchVideo with _$SearchVideo, BaseSearchContent {
|
||||
/// Initialize a [SearchVideo] instance.
|
||||
@With<BaseSearchContent>()
|
||||
//@With<BaseSearchContent>()
|
||||
const factory SearchVideo(
|
||||
/// Video ID.
|
||||
VideoId id,
|
||||
|
|
|
@ -271,8 +271,7 @@ class __$SearchVideoCopyWithImpl<$Res> extends _$SearchVideoCopyWithImpl<$Res>
|
|||
|
||||
/// @nodoc
|
||||
|
||||
@With<BaseSearchContent>()
|
||||
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,
|
||||
|
|
|
@ -16,7 +16,7 @@ class Bitrate with Comparable<Bitrate>, _$Bitrate {
|
|||
double get gigaBitsPerSecond => megaBitsPerSecond / 1024;
|
||||
|
||||
/// Initializes an instance of [Bitrate]
|
||||
@With<Comparable<Bitrate>>()
|
||||
//@With<Comparable<Bitrate>>()
|
||||
const factory Bitrate(
|
||||
|
||||
/// Bits per second.
|
||||
|
|
|
@ -106,8 +106,7 @@ class __$BitrateCopyWithImpl<$Res> extends _$BitrateCopyWithImpl<$Res>
|
|||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
@With<Comparable<Bitrate>>()
|
||||
class _$_Bitrate extends _Bitrate with Comparable<Bitrate> {
|
||||
class _$_Bitrate extends _Bitrate {
|
||||
const _$_Bitrate(this.bitsPerSecond) : super._();
|
||||
|
||||
factory _$_Bitrate.fromJson(Map<String, dynamic> json) =>
|
||||
|
@ -142,7 +141,7 @@ class _$_Bitrate extends _Bitrate with Comparable<Bitrate> {
|
|||
}
|
||||
}
|
||||
|
||||
abstract class _Bitrate extends Bitrate implements Comparable<Bitrate> {
|
||||
abstract class _Bitrate extends Bitrate {
|
||||
const factory _Bitrate(int bitsPerSecond) = _$_Bitrate;
|
||||
const _Bitrate._() : super._();
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ class FileSize with Comparable<FileSize>, _$FileSize {
|
|||
double get totalGigaBytes => totalMegaBytes / 1024;
|
||||
|
||||
/// Initializes an instance of [FileSize]
|
||||
@With<Comparable<FileSize>>()
|
||||
//@With<Comparable<FileSize>>()
|
||||
const factory FileSize(
|
||||
|
||||
/// Total bytes.
|
||||
|
|
|
@ -107,8 +107,7 @@ class __$FileSizeCopyWithImpl<$Res> extends _$FileSizeCopyWithImpl<$Res>
|
|||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
@With<Comparable<FileSize>>()
|
||||
class _$_FileSize extends _FileSize with Comparable<FileSize> {
|
||||
class _$_FileSize extends _FileSize {
|
||||
const _$_FileSize(this.totalBytes) : super._();
|
||||
|
||||
factory _$_FileSize.fromJson(Map<String, dynamic> json) =>
|
||||
|
@ -143,7 +142,7 @@ class _$_FileSize extends _FileSize with Comparable<FileSize> {
|
|||
}
|
||||
}
|
||||
|
||||
abstract class _FileSize extends FileSize implements Comparable<FileSize> {
|
||||
abstract class _FileSize extends FileSize {
|
||||
const factory _FileSize(int totalBytes) = _$_FileSize;
|
||||
const _FileSize._() : super._();
|
||||
|
||||
|
|
|
@ -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)));
|
||||
|
|
Loading…
Reference in New Issue