getStory<T> method

Story<StoryContent>? getStory<T>(
  1. Story<T>? getResolvedStory(
    1. String uuid
    )
)

Intended to be used by passing StoryblokClient.getResolvedStory T is needed to couple the generic content type.

Implementation

Story<StoryContent>? getStory<T>(Story<T>? Function(String uuid) getResolvedStory) {
  final story = getResolvedStory(uuid);
  if (story == null) return null;
  return Story.from(story);
}