fluffychat/lib/pangea/analytics/widgets/text_loading_shimmer.dart
ggurdin 027158e286
1435 refactor into function specific groupings (#1440)
* fix: deleted unreferenced files

* fix: sort files based on function
2025-01-14 14:00:30 -05:00

27 lines
786 B
Dart

import 'package:flutter/material.dart';
import 'package:shimmer/shimmer.dart';
import 'package:fluffychat/config/app_config.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
),
);
}
}