import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:wow_english/common/extension/string_extension.dart'; import 'package:wow_english/pages/user/bloc/user_bloc.dart'; import '../courese_module_model.dart'; class SectionHeaderWidget extends StatelessWidget { const SectionHeaderWidget({super.key, this.title, this.courseModuleCode}); final String? title; final String? courseModuleCode; @override Widget build(BuildContext context) { return BlocBuilder( builder: (context, state) { return Container( height: 45, width: double.infinity, color: CourseModuleModel(courseModuleCode ?? 'Phase-1').color, padding: EdgeInsets.symmetric(horizontal: 9.5.w), child: Row( children: [ ScreenUtil().bottomBarHeight.horizontalSpace, GestureDetector( onTap: () { Navigator.pop(context); }, child: Container( alignment: Alignment.center, child: Image.asset( 'back_around'.assetPng, height: 40.h, width: 40.w, ), ), ), 20.horizontalSpace, Expanded( child: Text( title ?? CourseModuleModel(courseModuleCode ?? 'Phase-1') .courseModuleTitle, textAlign: TextAlign.left, style: const TextStyle(color: Colors.white, fontSize: 30.0), )), ScreenUtil().bottomBarHeight.horizontalSpace, ], )); }, ); } }