mirrored_repositories/lifeclass/lib/pages/content/lessons
import 'package:flutter/material.dart';
import 'package:lifeclass/classes/Themes.dart';
import 'package:lifeclass/pages/content/lessons/classes/clsLanguageSelector.dart';
import 'package:lifeclass/pages/content/lessons/components/SubHeadings.dart';

import '../../../../classes/clsRichTextFormatter.dart';
import '../../../../widgets/ads/BannerAds.dart';
import '../components/ParagraphFormatter.dart';

class Lesson00 extends StatelessWidget {
  final double fontSize;
  final String colorTheme;
  final String language;
  const Lesson00({super.key,required this.fontSize,required this.colorTheme,required this.language});

  @override
  Widget build(BuildContext context) {
    var brightness = MediaQuery.of(context).platformBrightness;
    bool isDarkMode = brightness == Brightness.dark;


    List<clsRichTextFormatter> intro_01 = [
      clsRichTextFormatter(content:clsIntroduction.intro_01(language),fontStyle: FontStyle.normal, fontWeight: FontWeight.normal, bColor: '',color:'', fontSize: fontSize, isDarkMode: isDarkMode),
      clsRichTextFormatter(content:'',fontStyle: FontStyle.italic, fontWeight: FontWeight.normal, bColor: colorTheme,color:'', fontSize: fontSize, isDarkMode: isDarkMode),
    ];
    List<clsRichTextFormatter> intro_02 = [
      clsRichTextFormatter(content:clsIntroduction.intro_02(language),fontStyle: FontStyle.normal, fontWeight: FontWeight.normal, bColor: '',color:'', fontSize: fontSize, isDarkMode: isDarkMode),
      clsRichTextFormatter(content:'',fontStyle: FontStyle.italic, fontWeight: FontWeight.normal, bColor: colorTheme,color:'', fontSize: fontSize, isDarkMode: isDarkMode),
    ];
    List<clsRichTextFormatter> intro_03 = [
      clsRichTextFormatter(content:clsIntroduction.intro_03(language),fontStyle: FontStyle.normal, fontWeight: FontWeight.normal, bColor: '',color:'', fontSize: fontSize, isDarkMode: isDarkMode),
      clsRichTextFormatter(content:'',fontStyle: FontStyle.italic, fontWeight: FontWeight.normal, bColor: colorTheme,color:'', fontSize: fontSize, isDarkMode: isDarkMode),
    ];
    List<clsRichTextFormatter> intro_04 = [
      clsRichTextFormatter(content:clsIntroduction.intro_04(language),fontStyle: FontStyle.normal, fontWeight: FontWeight.normal, bColor: '',color:'', fontSize: fontSize, isDarkMode: isDarkMode),
      clsRichTextFormatter(content:'',fontStyle: FontStyle.italic, fontWeight: FontWeight.normal, bColor: colorTheme,color:'', fontSize: fontSize, isDarkMode: isDarkMode),
    ];


    List<clsRichTextFormatter> paragraph_ = [
      clsRichTextFormatter(content:'',fontStyle: FontStyle.normal, fontWeight: FontWeight.normal, bColor: '',color:'', fontSize: fontSize, isDarkMode: isDarkMode),
      clsRichTextFormatter(content:'',fontStyle: FontStyle.italic, fontWeight: FontWeight.normal, bColor: colorTheme,color:'', fontSize: fontSize, isDarkMode: isDarkMode),
    ];


    return Scaffold(
      body: SafeArea(
        child: Column(
          children: [Expanded(
            child: RawScrollbar(
              child: SingleChildScrollView(
                scrollDirection: Axis.vertical,
                child: SafeArea(
                  child: Column(
                    mainAxisSize: MainAxisSize.max,
                    mainAxisAlignment: MainAxisAlignment.start,
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children: [
                      SizedBox(height: 30),
                      Center(child:Padding(padding:EdgeInsets.all(10),child: Image.asset('assets/images/app_logo.png'))),
                      Center(child: Text(clsIntroduction.title_01(language),style: TextStyle(fontSize: fontSize,fontWeight: FontWeight.bold,color: myThemes.getColor(colorTheme)),)),
                      SizedBox(height: 30),
                      SubHeadings(content: clsIntroduction.subheadings_01(language), fontSize: fontSize),
                      ParagraphFormatter(richTextData: intro_01),
                      SubHeadings(content: clsIntroduction.subheadings_02(language), fontSize: fontSize),
                      ParagraphFormatter(richTextData: intro_02),
                      SubHeadings(content: clsIntroduction.subheadings_03(language), fontSize: fontSize),
                      ParagraphFormatter(richTextData: intro_03),
                      SubHeadings(content: clsIntroduction.subheadings_04(language), fontSize: fontSize),
                      ParagraphFormatter(richTextData: intro_04),
                      SizedBox(height:150.0),
                    ],
                  ),
                ),
              ),
            ),
          ),
            BannerAds()
          ],
        ),
      ),
    );
  }
}
