previousElementStoryId method

String? previousElementStoryId()

Implementation

String? previousElementStoryId() {
  int position =
      storiesIdsList!.indexWhere((id) => id.startsWith(pressedStoryId!));
  if (position - 1 < 0) {
    return null;
  }
  position--;
  return storiesIdsList![position];
}