77 lines
2.2 KiB
Dart
77 lines
2.2 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
import 'package:onufitness/constants/color_constant.dart';
|
|
import 'package:shimmer/shimmer.dart';
|
|
|
|
class LoadingVideoCard extends StatelessWidget {
|
|
final String title;
|
|
final String category;
|
|
|
|
const LoadingVideoCard({
|
|
super.key,
|
|
required this.title,
|
|
required this.category,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container(
|
|
decoration: BoxDecoration(
|
|
color: Colors.white,
|
|
borderRadius: BorderRadius.circular(12.r),
|
|
boxShadow: [
|
|
BoxShadow(color: Colors.black12, blurRadius: 4, spreadRadius: 2),
|
|
],
|
|
),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
// Shimmer
|
|
ClipRRect(
|
|
borderRadius: BorderRadius.vertical(top: Radius.circular(12.r)),
|
|
child: Shimmer.fromColors(
|
|
baseColor: Colors.grey.shade300,
|
|
highlightColor: Colors.grey.shade100,
|
|
child: Container(
|
|
height: 180.h,
|
|
width: double.infinity,
|
|
color: Colors.grey.shade300,
|
|
),
|
|
),
|
|
),
|
|
Padding(
|
|
padding: EdgeInsets.all(8.0.w),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Text(
|
|
category,
|
|
style: TextStyle(fontSize: 14.sp, color: greyTextColor1),
|
|
),
|
|
SizedBox(height: 4.h),
|
|
Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
Expanded(
|
|
child: Text(
|
|
title,
|
|
maxLines: 2,
|
|
overflow: TextOverflow.ellipsis,
|
|
style: TextStyle(
|
|
fontSize: 15.sp,
|
|
color: Colors.black,
|
|
fontWeight: FontWeight.w600,
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|