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

class TitlePage extends StatelessWidget {
  final language;
  final String dayText;
  final String preText;
  final String midText;
  final String postText;
  final double fontSize;
  final bool isDarkMode;
  final String colorTheme;
  const TitlePage({super.key,data,required this.dayText,required this.preText,required this.midText,required this.postText,required this.fontSize,   required this.language, required this.isDarkMode,required this.colorTheme});

  @override
  Widget build(BuildContext context) {
    return Column(
      children: [Container(
        width: double.infinity,
        child: Padding(
          padding: EdgeInsets.symmetric(horizontal: 10),
          child: Column(
            mainAxisSize: MainAxisSize.max,
            crossAxisAlignment: CrossAxisAlignment.center,
            children: [
              SizedBox(height: 20,),
              Text(dayText,textAlign: TextAlign.center,  style: TextStyle(fontWeight: FontWeight.bold,fontSize: fontSize + 5,letterSpacing: 10.0)),
              SizedBox(height: 20,),
              RichText(textAlign: TextAlign.center,text: TextSpan(
                children: [
                  TextSpan(
                  text: preText + ' ',
                  style: TextStyle(
                    color:  isDarkMode ? Colors.white : Colors.black,
                    fontStyle: FontStyle.normal,
                    fontWeight: FontWeight.bold,
                    fontSize: fontSize + 10,
                  )),
                  TextSpan(
                      text: midText + ' ',
                      style: TextStyle(
                        color:  isDarkMode ? Colors.white : myThemes.getColor(colorTheme),
                        //backgroundColor:  isDarkMode? Colors.white38:myThemes.getLightColor(colorTheme),
                        fontStyle: FontStyle.normal,
                        fontWeight: FontWeight.bold,
                        fontSize: fontSize + 10,
                      )),
                  TextSpan(
                      text: postText ,
                      style: TextStyle(
                        color:  isDarkMode ? Colors.white : Colors.black,
                        fontStyle: FontStyle.normal,
                        fontWeight: FontWeight.bold,
                        fontSize: fontSize + 10,
                      )),
                ]
              )),
              SizedBox(height: 5,),
            ],
          ),
        ),
      ),
        SizedBox(height: 10,),//S
      ]
    );
  }
}
