You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
fluffychat/lib/pangea/choreographer/widgets/text_loading_shimmer.dart

26 lines
784 B
Dart

import 'package:fluffychat/config/app_config.dart';
import 'package:flutter/material.dart';
import 'package:shimmer/shimmer.dart';
class TextLoadingShimmer extends StatelessWidget {
final double width;
const TextLoadingShimmer({
super.key,
this.width = 140.0,
});
@override
Widget build(BuildContext context) {
return Shimmer.fromColors(
baseColor: Colors.transparent, // Base color of the shimmer effect
// for higlight, use white with 50 opacity
highlightColor: AppConfig.primaryColor.withAlpha(70),
child: Container(
height: AppConfig.messageFontSize * AppConfig.fontSizeFactor,
width: width, // Width of the rectangle
color: AppConfig.primaryColor, // Background color of the rectangle
),
);
}
}