dart format

This commit is contained in:
Mattia 2022-03-03 12:09:08 +01:00
parent e1bee8c6d9
commit 51ba543deb
6 changed files with 8 additions and 10 deletions

View File

@ -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,

View File

@ -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 ?? '',

View File

@ -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');

View File

@ -1,4 +1,3 @@
import 'package:collection/collection.dart';
import 'package:json_annotation/json_annotation.dart';

View File

@ -1,4 +1,3 @@
import 'package:collection/collection.dart';
import 'package:json_annotation/json_annotation.dart';

View File

@ -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;