26 lines
670 B
Dart
26 lines
670 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:shimmer/shimmer.dart';
|
|
|
|
class LoadingSkeleton extends StatelessWidget {
|
|
const LoadingSkeleton({this.height = 220, super.key});
|
|
|
|
final double height;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final base = Theme.of(context).colorScheme.surfaceContainerHighest;
|
|
final highlight = Theme.of(context).colorScheme.surface;
|
|
return Shimmer.fromColors(
|
|
baseColor: base,
|
|
highlightColor: highlight,
|
|
child: Container(
|
|
height: height,
|
|
decoration: BoxDecoration(
|
|
color: base,
|
|
borderRadius: BorderRadius.circular(8),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|