migração flutter 2.2.1
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
class YouTubeSearchResponse {
|
||||
String kind;
|
||||
String etag;
|
||||
String nextPageToken;
|
||||
String regionCode;
|
||||
PageInfo pageInfo;
|
||||
List<YouTubeItems> items;
|
||||
int errorCode;
|
||||
String errorMessage;
|
||||
String? kind;
|
||||
String? etag;
|
||||
String? nextPageToken;
|
||||
String? regionCode;
|
||||
PageInfo? pageInfo;
|
||||
List<YouTubeItems>? items;
|
||||
int? errorCode;
|
||||
String? errorMessage;
|
||||
|
||||
YouTubeSearchResponse({this.kind, this.etag, this.nextPageToken, this.regionCode, this.pageInfo, this.items,this.errorCode = 0, this.errorMessage = ''});
|
||||
|
||||
@@ -17,8 +17,8 @@ class YouTubeSearchResponse {
|
||||
regionCode = json['regionCode'] ?? '';
|
||||
pageInfo = json['pageInfo'] != null ? new PageInfo.fromJson(json['pageInfo']) : null;
|
||||
if (json['items'] != null) {
|
||||
items = new List<YouTubeItems>();
|
||||
json['items'].forEach((v) { items.add(new YouTubeItems.fromJson(v)); });
|
||||
items = <YouTubeItems>[];
|
||||
json['items'].forEach((v) { items!.add(new YouTubeItems.fromJson(v)); });
|
||||
}
|
||||
errorCode = 0;
|
||||
errorMessage = '';
|
||||
@@ -26,8 +26,8 @@ class YouTubeSearchResponse {
|
||||
}
|
||||
|
||||
class PageInfo {
|
||||
int totalResults;
|
||||
int resultsPerPage;
|
||||
int? totalResults;
|
||||
int? resultsPerPage;
|
||||
|
||||
PageInfo({this.totalResults, this.resultsPerPage});
|
||||
|
||||
@@ -45,10 +45,10 @@ class PageInfo {
|
||||
}
|
||||
|
||||
class YouTubeItems {
|
||||
String kind;
|
||||
String etag;
|
||||
Id id;
|
||||
Snippet snippet;
|
||||
String? kind;
|
||||
String? etag;
|
||||
Id? id;
|
||||
Snippet? snippet;
|
||||
|
||||
YouTubeItems({this.kind, this.etag, this.id, this.snippet});
|
||||
|
||||
@@ -64,18 +64,18 @@ class YouTubeItems {
|
||||
data['kind'] = this.kind;
|
||||
data['etag'] = this.etag;
|
||||
if (this.id != null) {
|
||||
data['id'] = this.id.toJson();
|
||||
data['id'] = this.id!.toJson();
|
||||
}
|
||||
if (this.snippet != null) {
|
||||
data['snippet'] = this.snippet.toJson();
|
||||
data['snippet'] = this.snippet!.toJson();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Id {
|
||||
String kind;
|
||||
String videoId;
|
||||
String? kind;
|
||||
String? videoId;
|
||||
|
||||
Id({this.kind, this.videoId});
|
||||
|
||||
@@ -93,14 +93,14 @@ class Id {
|
||||
}
|
||||
|
||||
class Snippet {
|
||||
String publishedAt;
|
||||
String channelId;
|
||||
String title;
|
||||
String description;
|
||||
Thumbnails thumbnails;
|
||||
String channelTitle;
|
||||
String liveBroadcastContent;
|
||||
String publishTime;
|
||||
String? publishedAt;
|
||||
String? channelId;
|
||||
String? title;
|
||||
String? description;
|
||||
Thumbnails? thumbnails;
|
||||
String? channelTitle;
|
||||
String? liveBroadcastContent;
|
||||
String? publishTime;
|
||||
|
||||
Snippet({this.publishedAt, this.channelId, this.title, this.description, this.thumbnails, this.channelTitle, this.liveBroadcastContent, this.publishTime});
|
||||
|
||||
@@ -122,7 +122,7 @@ class Snippet {
|
||||
data['title'] = this.title;
|
||||
data['description'] = this.description;
|
||||
if (this.thumbnails != null) {
|
||||
data['thumbnails'] = this.thumbnails.toJson();
|
||||
data['thumbnails'] = this.thumbnails!.toJson();
|
||||
}
|
||||
data['channelTitle'] = this.channelTitle;
|
||||
data['liveBroadcastContent'] = this.liveBroadcastContent;
|
||||
@@ -132,9 +132,9 @@ class Snippet {
|
||||
}
|
||||
|
||||
class Thumbnails {
|
||||
ThumbDefault thumbDefault;
|
||||
ThumbDefault medium;
|
||||
ThumbDefault high;
|
||||
ThumbDefault? thumbDefault;
|
||||
ThumbDefault? medium;
|
||||
ThumbDefault? high;
|
||||
|
||||
Thumbnails({this.thumbDefault, this.medium, this.high});
|
||||
|
||||
@@ -147,22 +147,22 @@ class Thumbnails {
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
if (this.thumbDefault != null) {
|
||||
data['default'] = this.thumbDefault.toJson();
|
||||
data['default'] = this.thumbDefault!.toJson();
|
||||
}
|
||||
if (this.medium != null) {
|
||||
data['medium'] = this.medium.toJson();
|
||||
data['medium'] = this.medium!.toJson();
|
||||
}
|
||||
if (this.high != null) {
|
||||
data['high'] = this.high.toJson();
|
||||
data['high'] = this.high!.toJson();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class ThumbDefault {
|
||||
String url;
|
||||
int width;
|
||||
int height;
|
||||
String? url;
|
||||
int? width;
|
||||
int? height;
|
||||
|
||||
ThumbDefault({this.url, this.width, this.height});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user