dart format
This commit is contained in:
parent
e1bee8c6d9
commit
51ba543deb
|
@ -34,8 +34,8 @@ class ChannelClient {
|
|||
Future<Channel> getByUsername(dynamic username) async {
|
||||
username = Username.fromString(username);
|
||||
|
||||
var channelPage =
|
||||
await ChannelPage.getByUsername(_httpClient, (username as Username).value);
|
||||
var channelPage = await ChannelPage.getByUsername(
|
||||
_httpClient, (username as Username).value);
|
||||
return Channel(
|
||||
ChannelId(channelPage.channelId),
|
||||
channelPage.channelTitle,
|
||||
|
|
|
@ -18,7 +18,8 @@ class PlaylistClient {
|
|||
Future<Playlist> get(dynamic id) async {
|
||||
id = PlaylistId.fromString(id);
|
||||
|
||||
var response = await PlaylistPage.get(_httpClient, (id as PlaylistId).value);
|
||||
var response =
|
||||
await PlaylistPage.get(_httpClient, (id as PlaylistId).value);
|
||||
return Playlist(
|
||||
id,
|
||||
response.title ?? '',
|
||||
|
|
|
@ -110,10 +110,8 @@ class _InitialData extends InitialData {
|
|||
.toList() ??
|
||||
[];
|
||||
|
||||
late final int? viewCount = content
|
||||
.get('viewCountText')
|
||||
?.getT<String>('simpleText')
|
||||
?.parseInt();
|
||||
late final int? viewCount =
|
||||
content.get('viewCountText')?.getT<String>('simpleText')?.parseInt();
|
||||
|
||||
late final String? joinDate =
|
||||
content.get('joinedDateText')?.getList('runs')?[1].getT<String>('text');
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
import 'package:collection/collection.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
import 'package:collection/collection.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
|
|
|
@ -32,7 +32,8 @@ extension VideoStreamInfoExtension<T extends VideoStreamInfo> on Iterable<T> {
|
|||
Set<String> getAllVideoQualitiesLabel() => map((e) => e.qualityLabel).toSet();
|
||||
|
||||
/// Gets the stream with best video quality.
|
||||
@Deprecated('This is actually a typo, and actually returns the videos sorted by the best *video quality*. Now use the `bestQuality` getter ')
|
||||
@Deprecated(
|
||||
'This is actually a typo, and actually returns the videos sorted by the best *video quality*. Now use the `bestQuality` getter ')
|
||||
T withHighestBitrate() => sortByVideoQuality().last;
|
||||
|
||||
T get bestQuality => sortByVideoQuality().last;
|
||||
|
|
Loading…
Reference in New Issue