home_video_item.dart
2.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:wow_english/common/extension/string_extension.dart';
import 'package:wow_english/common/widgets/ow_image_widget.dart';
import 'package:wow_english/models/course_entity.dart';
import '../courese_module_model.dart';
class HomeVideoItem extends StatelessWidget {
  const HomeVideoItem({super.key, this.lessons, this.entity});
  final CourseEntity? entity;
  final CourseCourseLessons? lessons;
  @override
  Widget build(BuildContext context) {
    return Padding(
      padding: EdgeInsets.symmetric(horizontal: 12.w,vertical: 24.h),
      child: Container(
        width: 165.w,
        padding: EdgeInsets.symmetric(horizontal: 16.w,vertical: 24.h),
        decoration: BoxDecoration(
          image: DecorationImage(
              image: AssetImage('gendubeij'.assetPng),
              fit: BoxFit.fill
          ),
        ),
        child: Column(
          mainAxisAlignment: MainAxisAlignment.spaceBetween,
          children: [
            Expanded(
                child: Container(
                  decoration: BoxDecoration(
                      border: Border.all(
                        width: 2,
                        color: const Color(0xFF140C10),
                      ),
                      borderRadius: BorderRadius.circular(6)
                  ),
                  child: OwImageWidget(
                    name: lessons?.coverUrl??'',
                    fit: BoxFit.fitHeight,
                  ),
                )
            ),
            24.verticalSpace,
            Container(
              decoration: BoxDecoration(
                  border: Border.all(
                    width: 2,
                    color: const Color(0xFF140C10),
                  ),
                  color: CourseModuleModel(entity?.courseModuleCode??'Phase-1').color,
                  borderRadius: BorderRadius.circular(6)
              ),
              padding: EdgeInsets.symmetric(horizontal: 10.w),
              child: Text(
                lessons?.name??'',
                maxLines: 1,
                style: TextStyle(
                    fontSize: 25.sp,
                    color: const Color(0xFF333333)
                ),
              ),
            )
          ],
        ),
      ),
    );
  }
}