fluffychat/lib/pangea/choreographer/widgets/text_loading_shimmer.dart
ggurdin 771bd4b6c3
fix: don't run startChatWithBotIfNotPresent if user is bot (#1392)
* fix: don't run startChatWithBotIfNotPresent if user is bot

* fix: dart formatting
2025-01-09 16:04:16 -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
),
);
}
}