Remove @With annotation
This commit is contained in:
parent
bff709cf94
commit
968d750408
|
@ -20,3 +20,4 @@ linter:
|
||||||
prefer_relative_imports: true
|
prefer_relative_imports: true
|
||||||
avoid_relative_lib_imports: false
|
avoid_relative_lib_imports: false
|
||||||
always_use_package_imports: false
|
always_use_package_imports: false
|
||||||
|
avoid_dynamic_calls: false
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import 'package:html/parser.dart' as parser;
|
import 'package:html/parser.dart' as parser;
|
||||||
import 'package:http/http.dart';
|
|
||||||
|
|
||||||
import '../../exceptions/exceptions.dart';
|
import '../../exceptions/exceptions.dart';
|
||||||
import '../../extensions/helpers_extension.dart';
|
import '../../extensions/helpers_extension.dart';
|
||||||
|
|
|
@ -9,7 +9,7 @@ part 'search_channel.freezed.dart';
|
||||||
@freezed
|
@freezed
|
||||||
class SearchChannel with _$SearchChannel, BaseSearchContent {
|
class SearchChannel with _$SearchChannel, BaseSearchContent {
|
||||||
/// Initialize a [SearchChannel] instance.
|
/// Initialize a [SearchChannel] instance.
|
||||||
@With<BaseSearchContent>()
|
//@With<BaseSearchContent>()
|
||||||
const factory SearchChannel(
|
const factory SearchChannel(
|
||||||
|
|
||||||
/// Channel id.
|
/// Channel id.
|
||||||
|
|
|
@ -160,8 +160,7 @@ class __$SearchChannelCopyWithImpl<$Res>
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
|
|
||||||
@With<BaseSearchContent>()
|
class _$_SearchChannel implements _SearchChannel {
|
||||||
class _$_SearchChannel with BaseSearchContent implements _SearchChannel {
|
|
||||||
const _$_SearchChannel(this.id, this.name, this.description, this.videoCount);
|
const _$_SearchChannel(this.id, this.name, this.description, this.videoCount);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -214,7 +213,7 @@ class _$_SearchChannel with BaseSearchContent implements _SearchChannel {
|
||||||
__$SearchChannelCopyWithImpl<_SearchChannel>(this, _$identity);
|
__$SearchChannelCopyWithImpl<_SearchChannel>(this, _$identity);
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract class _SearchChannel implements SearchChannel, BaseSearchContent {
|
abstract class _SearchChannel implements SearchChannel {
|
||||||
const factory _SearchChannel(
|
const factory _SearchChannel(
|
||||||
ChannelId id, String name, String description, int videoCount) =
|
ChannelId id, String name, String description, int videoCount) =
|
||||||
_$_SearchChannel;
|
_$_SearchChannel;
|
||||||
|
|
|
@ -10,7 +10,7 @@ part 'search_playlist.freezed.dart';
|
||||||
@freezed
|
@freezed
|
||||||
class SearchPlaylist with _$SearchPlaylist, BaseSearchContent {
|
class SearchPlaylist with _$SearchPlaylist, BaseSearchContent {
|
||||||
/// Initialize a [SearchPlaylist] instance.
|
/// Initialize a [SearchPlaylist] instance.
|
||||||
@With<BaseSearchContent>()
|
//@With<BaseSearchContent>()
|
||||||
const factory SearchPlaylist(
|
const factory SearchPlaylist(
|
||||||
|
|
||||||
/// PlaylistId.
|
/// PlaylistId.
|
||||||
|
|
|
@ -167,8 +167,7 @@ class __$SearchPlaylistCopyWithImpl<$Res>
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
|
|
||||||
@With<BaseSearchContent>()
|
class _$_SearchPlaylist implements _SearchPlaylist {
|
||||||
class _$_SearchPlaylist with BaseSearchContent implements _SearchPlaylist {
|
|
||||||
const _$_SearchPlaylist(this.playlistId, this.playlistTitle,
|
const _$_SearchPlaylist(this.playlistId, this.playlistTitle,
|
||||||
this.playlistVideoCount, this.thumbnails);
|
this.playlistVideoCount, this.thumbnails);
|
||||||
|
|
||||||
|
@ -223,7 +222,7 @@ class _$_SearchPlaylist with BaseSearchContent implements _SearchPlaylist {
|
||||||
__$SearchPlaylistCopyWithImpl<_SearchPlaylist>(this, _$identity);
|
__$SearchPlaylistCopyWithImpl<_SearchPlaylist>(this, _$identity);
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract class _SearchPlaylist implements SearchPlaylist, BaseSearchContent {
|
abstract class _SearchPlaylist implements SearchPlaylist {
|
||||||
const factory _SearchPlaylist(PlaylistId playlistId, String playlistTitle,
|
const factory _SearchPlaylist(PlaylistId playlistId, String playlistTitle,
|
||||||
int playlistVideoCount, List<Thumbnail> thumbnails) = _$_SearchPlaylist;
|
int playlistVideoCount, List<Thumbnail> thumbnails) = _$_SearchPlaylist;
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ part 'search_video.freezed.dart';
|
||||||
@freezed
|
@freezed
|
||||||
class SearchVideo with _$SearchVideo, BaseSearchContent {
|
class SearchVideo with _$SearchVideo, BaseSearchContent {
|
||||||
/// Initialize a [SearchVideo] instance.
|
/// Initialize a [SearchVideo] instance.
|
||||||
@With<BaseSearchContent>()
|
//@With<BaseSearchContent>()
|
||||||
const factory SearchVideo(
|
const factory SearchVideo(
|
||||||
/// Video ID.
|
/// Video ID.
|
||||||
VideoId id,
|
VideoId id,
|
||||||
|
|
|
@ -271,8 +271,7 @@ class __$SearchVideoCopyWithImpl<$Res> extends _$SearchVideoCopyWithImpl<$Res>
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
|
|
||||||
@With<BaseSearchContent>()
|
class _$_SearchVideo implements _SearchVideo {
|
||||||
class _$_SearchVideo with BaseSearchContent implements _SearchVideo {
|
|
||||||
const _$_SearchVideo(
|
const _$_SearchVideo(
|
||||||
this.id,
|
this.id,
|
||||||
this.title,
|
this.title,
|
||||||
|
@ -372,7 +371,7 @@ class _$_SearchVideo with BaseSearchContent implements _SearchVideo {
|
||||||
__$SearchVideoCopyWithImpl<_SearchVideo>(this, _$identity);
|
__$SearchVideoCopyWithImpl<_SearchVideo>(this, _$identity);
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract class _SearchVideo implements SearchVideo, BaseSearchContent {
|
abstract class _SearchVideo implements SearchVideo {
|
||||||
const factory _SearchVideo(
|
const factory _SearchVideo(
|
||||||
VideoId id,
|
VideoId id,
|
||||||
String title,
|
String title,
|
||||||
|
|
|
@ -16,7 +16,7 @@ class Bitrate with Comparable<Bitrate>, _$Bitrate {
|
||||||
double get gigaBitsPerSecond => megaBitsPerSecond / 1024;
|
double get gigaBitsPerSecond => megaBitsPerSecond / 1024;
|
||||||
|
|
||||||
/// Initializes an instance of [Bitrate]
|
/// Initializes an instance of [Bitrate]
|
||||||
@With<Comparable<Bitrate>>()
|
//@With<Comparable<Bitrate>>()
|
||||||
const factory Bitrate(
|
const factory Bitrate(
|
||||||
|
|
||||||
/// Bits per second.
|
/// Bits per second.
|
||||||
|
|
|
@ -106,8 +106,7 @@ class __$BitrateCopyWithImpl<$Res> extends _$BitrateCopyWithImpl<$Res>
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
@With<Comparable<Bitrate>>()
|
class _$_Bitrate extends _Bitrate {
|
||||||
class _$_Bitrate extends _Bitrate with Comparable<Bitrate> {
|
|
||||||
const _$_Bitrate(this.bitsPerSecond) : super._();
|
const _$_Bitrate(this.bitsPerSecond) : super._();
|
||||||
|
|
||||||
factory _$_Bitrate.fromJson(Map<String, dynamic> json) =>
|
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 factory _Bitrate(int bitsPerSecond) = _$_Bitrate;
|
||||||
const _Bitrate._() : super._();
|
const _Bitrate._() : super._();
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ class FileSize with Comparable<FileSize>, _$FileSize {
|
||||||
double get totalGigaBytes => totalMegaBytes / 1024;
|
double get totalGigaBytes => totalMegaBytes / 1024;
|
||||||
|
|
||||||
/// Initializes an instance of [FileSize]
|
/// Initializes an instance of [FileSize]
|
||||||
@With<Comparable<FileSize>>()
|
//@With<Comparable<FileSize>>()
|
||||||
const factory FileSize(
|
const factory FileSize(
|
||||||
|
|
||||||
/// Total bytes.
|
/// Total bytes.
|
||||||
|
|
|
@ -107,8 +107,7 @@ class __$FileSizeCopyWithImpl<$Res> extends _$FileSizeCopyWithImpl<$Res>
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
@With<Comparable<FileSize>>()
|
class _$_FileSize extends _FileSize {
|
||||||
class _$_FileSize extends _FileSize with Comparable<FileSize> {
|
|
||||||
const _$_FileSize(this.totalBytes) : super._();
|
const _$_FileSize(this.totalBytes) : super._();
|
||||||
|
|
||||||
factory _$_FileSize.fromJson(Map<String, dynamic> json) =>
|
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 factory _FileSize(int totalBytes) = _$_FileSize;
|
||||||
const _FileSize._() : super._();
|
const _FileSize._() : super._();
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,7 @@ void main() {
|
||||||
test('VideoId - ${val.value}', () async {
|
test('VideoId - ${val.value}', () async {
|
||||||
var manifest = await yt!.videos.streamsClient.getManifest(val);
|
var manifest = await yt!.videos.streamsClient.getManifest(val);
|
||||||
for (final streamInfo in manifest.streams) {
|
for (final streamInfo in manifest.streams) {
|
||||||
print('Stream: ${streamInfo.tag}');
|
// print('Stream: ${streamInfo.tag}');
|
||||||
expect(yt!.videos.streamsClient.get(streamInfo).first, completes);
|
expect(yt!.videos.streamsClient.get(streamInfo).first, completes);
|
||||||
}
|
}
|
||||||
}, timeout: const Timeout(Duration(minutes: 5)));
|
}, timeout: const Timeout(Duration(minutes: 5)));
|
||||||
|
|
Loading…
Reference in New Issue