fluffychat/lib/pangea/common/widgets/shimmer_box.dart
avashilling 1de440156c
feat: unsubscribed page in vocab practice (#5694)
* feat: unsubscribed page in vocab practice

* fix uncaught unsubscribed error

---------

Co-authored-by: ggurdin <ggurdin@gmail.com>
2026-02-13 14:36:40 -05:00

37 lines
836 B
Dart

import 'package:flutter/material.dart';
import 'package:shimmer/shimmer.dart';
class ShimmerBox extends StatelessWidget {
final Color baseColor;
final Color highlightColor;
final double width;
final double height;
final BorderRadius? borderRadius;
const ShimmerBox({
super.key,
required this.baseColor,
required this.highlightColor,
required this.width,
required this.height,
this.borderRadius,
});
@override
Widget build(BuildContext context) {
return Shimmer.fromColors(
loop: 1,
baseColor: baseColor,
highlightColor: highlightColor,
child: Container(
width: width,
height: height,
decoration: BoxDecoration(
color: baseColor,
borderRadius: borderRadius ?? BorderRadius.circular(8),
),
),
);
}
}