getContents method

  1. @override
Future<LearningContentsDto> getContents(
  1. String chapterId
)
override

Implementation

@override
Future<LearningContentsDto> getContents(String chapterId) async {
  await Future.delayed(
    const Duration(milliseconds: 500),
  );

  return LearningContentsDto(
    learningContents: [
      LearningContentDto(
        contentId: '1',
        orderId: 1,
        contentTitle: 'コンテンツタイトル',
        contentNumber: 1,
        isCompleted: true,
        contentDetail: ContentDetailDto(
          contentType: LearningContentType.docs,
          videoUrl: null,
          documentTitle: 'ドキュメントタイトル',
          document:
              '「血圧を下げるにはどんな食べ物を食べるべき?」\n「減塩って具体的にどうすればいい?」\n\n高血圧で食事の見直しをすすめられたけれど、実際にはどのようにすればよいのか、とお困りではありませんか?\n\n高血圧の食事療法において欠かせないのは、「減塩」です。そのため、塩分が少ない食べ物を選んで食べるというのが基本になります。同時に、ミネラルや食物繊維が豊富な食べ物を食べると、より血圧を下げやすくなります。\n\n具体的には、以下のような食べ物がおすすめです。\n\n血圧を下げるために取り入れたい食べ物\n\n減塩は、高血圧ケアの要となる考え方です。正確な知識を身につけて取り組むことが、血圧を下げることにつながります。\nそこでこの記事では、以下について詳しく解説します。\n\n▼血圧を下げるために取り入れたい減塩の食べ物\n▼楽に減塩するためにおすすめのレシピ\n▼美味しく減塩を成功させるためのコツ\n▼高血圧ケアにおける「減塩」と「排塩」の必要性\n▼血圧を上げる塩分の多い食べ物\n\nこの記事を読むことで、血圧を下げるためには何をどのように食べるべきかということがわかります。\n\n高血圧をしっかりとケアして健康な毎日を送るために、ぜひ最後までお読みください。',
          quizContent: null,
        ),
      ),
      LearningContentDto(
        contentId: '2',
        orderId: 2,
        contentTitle: 'コンテンツタイトル',
        contentNumber: 2,
        isCompleted: false,
        contentDetail: ContentDetailDto(
          contentType: LearningContentType.video,
          videoUrl:
              'https://flutter.github.io/assets-for-api-docs/assets/videos/butterfly.mp4',
          documentTitle: null,
          document: null,
          quizContent: null,
        ),
      ),
      LearningContentDto(
        contentId: '3',
        orderId: 3,
        contentTitle: 'コンテンツタイトル',
        contentNumber: 3,
        isCompleted: false,
        contentDetail: ContentDetailDto(
          contentType: LearningContentType.quiz,
          videoUrl: null,
          documentTitle: null,
          document: null,
          quizContent: QuizContentDto(
              quizId: '1',
              quizContent: 'クイズの内容',
              quizQuestions: QuizOptionsDto(
                quizOptions: [
                  QuizOptionDto(
                    optionId: '1',
                    optionText: 'クイズの選択肢1',
                    isCorrectOption: false,
                    isSelected: false,
                  ),
                  QuizOptionDto(
                    optionId: '2',
                    optionText: 'クイズの選択肢2',
                    isCorrectOption: true,
                    isSelected: false,
                  ),
                  QuizOptionDto(
                    optionId: '3',
                    optionText: 'クイズの選択肢3',
                    isCorrectOption: false,
                    isSelected: false,
                  ),
                  QuizOptionDto(
                    optionId: '4',
                    optionText: 'クイズの選択肢4',
                    isCorrectOption: false,
                    isSelected: false,
                  ),
                ],
              )),
        ),
      ),
    ],
  );
}