* feat: unsubscribed page in vocab practice * fix uncaught unsubscribed error --------- Co-authored-by: ggurdin <ggurdin@gmail.com>
37 lines
836 B
Dart
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),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|