import 'package:flutter/material.dart';
import 'package:payment_plugin/presentation/components/content_placeholder.dart';
import 'package:payment_plugin/presentation/components/title_placeholder.dart';
import 'package:payment_plugin/themes/light_theme.dart';
import 'package:shimmer/shimmer.dart';
class PaymentCardsShimmerLoader extends StatelessWidget {
const PaymentCardsShimmerLoader({super.key});
@override
Widget build(BuildContext context) {
return Shimmer.fromColors(
baseColor: sandColor[40]!,
highlightColor: sandColor[10]!,
enabled: true,
child: ListView(
children: [
const SizedBox(height: 40),
const TitlePlaceholder(width: 200),
const SizedBox(height: 12),
const TitlePlaceholder(width: 120),
const SizedBox(height: 40),
const TitlePlaceholder(width: 160),
const SizedBox(height: 20),
...List.generate(
3,
(index) => const Padding(
padding: EdgeInsets.symmetric(vertical: 8.0),
child:
ContentPlaceholder(lineType: ContentLineType.twoLines),
)),
const SizedBox(height: 12),
// Simulate Add Card button
const Padding(
padding: EdgeInsets.symmetric(horizontal: 32.0),
child: SizedBox(
width: double.infinity,
height: 48,
child: DecoratedBox(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(8)),
),
),
),
),
const SizedBox(height: 24),
],
),
);
}
}