Open ebel-frank opened 1 year ago
I kept getting this an exception when I call the function youtubeDataApi.fetchVideoData(videoId). Below is the exception.
youtubeDataApi.fetchVideoData(videoId)
Unhandled Exception: NoSuchMethodError: The method '[]' was called on null. E/flutter (16928): Receiver: null E/flutter (16928): Tried calling: E/flutter (16928): #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:38:5) E/flutter (16928): #1 new VideoPage.fromMap (package:youtube_data_api/models/video_page.dart:47:167) E/flutter (16928): #2 YoutubeDataApi.fetchVideoData (package:youtube_data_api/youtube_data_api.dart:435:28) E/flutter (16928): E/flutter (16928): #3 _FutureBuilderState._subscribe. (package:flutter/src/widgets/async.dart:628:33)
It seems youtube updated their apis, so I modified the code to fit with what the api was returning.
I kept getting this an exception when I call the function
youtubeDataApi.fetchVideoData(videoId)
. Below is the exception.Unhandled Exception: NoSuchMethodError: The method '[]' was called on null. E/flutter (16928): Receiver: null E/flutter (16928): Tried calling: E/flutter (16928): #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:38:5) E/flutter (16928): #1 new VideoPage.fromMap (package:youtube_data_api/models/video_page.dart:47:167) E/flutter (16928): #2 YoutubeDataApi.fetchVideoData (package:youtube_data_api/youtube_data_api.dart:435:28) E/flutter (16928):
E/flutter (16928): #3 _FutureBuilderState._subscribe. (package:flutter/src/widgets/async.dart:628:33)
It seems youtube updated their apis, so I modified the code to fit with what the api was returning.