35 lines
944 B
Dart
35 lines
944 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:shimmer/shimmer.dart';
|
|
import 'package:proxibuy/presentation/ui/theme/theme.dart';
|
|
|
|
class DefaultPlaceHolder extends StatelessWidget {
|
|
final Widget child;
|
|
final bool enabled;
|
|
final double? width;
|
|
final double? height;
|
|
const DefaultPlaceHolder(
|
|
{super.key,
|
|
required this.child,
|
|
this.enabled = true,
|
|
this.width,
|
|
this.height});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final colors = themeColor(context);
|
|
return enabled
|
|
? IgnorePointer(
|
|
ignoring: true,
|
|
child: SizedBox(
|
|
width: width,
|
|
height: height,
|
|
child: Shimmer.fromColors(
|
|
baseColor: colors?.baseColor ?? Colors.grey[300]!,
|
|
highlightColor: colors?.highlightColor ?? Colors.grey[100]!,
|
|
child: child),
|
|
),
|
|
)
|
|
: child;
|
|
}
|
|
}
|