getStory method

Future<Story> getStory(
  1. int storyID
)

Function used to access single story by using storyID

Implementation

Future<Story> getStory(int storyID) async {
  http.Response response = await _getStory(storyID);

  final json = jsonDecode(response.body);

  return Story.fromJson(json);
}