2024-11-25 23:19:28 +00:00
|
|
|
// section_card_loading.dart
|
2024-11-23 10:28:23 +00:00
|
|
|
import 'package:english_learning/core/widgets/loading/shimmer_loading_widget.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
|
|
class SectionCardLoading extends StatelessWidget {
|
|
|
|
|
const SectionCardLoading({super.key});
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
return Card(
|
2024-11-25 23:19:28 +00:00
|
|
|
color: Colors.white,
|
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
|
borderRadius: BorderRadius.circular(12),
|
|
|
|
|
),
|
|
|
|
|
elevation: 1,
|
|
|
|
|
margin: const EdgeInsets.symmetric(vertical: 8.0),
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets.all(12.0),
|
|
|
|
|
child: Row(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
ShimmerLoadingWidget(
|
|
|
|
|
width: 90,
|
|
|
|
|
height: 104,
|
|
|
|
|
borderRadius: BorderRadius.circular(8),
|
|
|
|
|
),
|
|
|
|
|
const SizedBox(width: 16),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
ShimmerLoadingWidget(
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.4,
|
|
|
|
|
height: 20,
|
|
|
|
|
borderRadius: BorderRadius.circular(4),
|
|
|
|
|
),
|
|
|
|
|
const SizedBox(height: 12),
|
|
|
|
|
Column(
|
|
|
|
|
children: List.generate(
|
|
|
|
|
3,
|
|
|
|
|
(index) => Padding(
|
|
|
|
|
padding: EdgeInsets.only(bottom: index != 2 ? 6.0 : 0),
|
|
|
|
|
child: ShimmerLoadingWidget(
|
|
|
|
|
width: MediaQuery.of(context).size.width *
|
|
|
|
|
(0.8 - (index * 0.1)),
|
|
|
|
|
height: 12,
|
|
|
|
|
borderRadius: BorderRadius.circular(4),
|
|
|
|
|
),
|
|
|
|
|
),
|
2024-11-23 10:28:23 +00:00
|
|
|
),
|
2024-11-25 23:19:28 +00:00
|
|
|
),
|
|
|
|
|
],
|
2024-11-23 10:28:23 +00:00
|
|
|
),
|
2024-11-25 23:19:28 +00:00
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
2024-11-23 10:28:23 +00:00
|
|
|
}
|
|
|
|
|
}
|