setChatBackgroundImage method
void
setChatBackgroundImage(
- ImageProvider<
Object> image, { - BoxFit fit = BoxFit.cover,
- Alignment alignment = Alignment.center,
- ColorFilter? colorFilter,
- double opacity = 1.0,
- bool showEmptyText = true,
Convenience helper to set a chat background image with optional fitting, opacity, and text suppression.
Implementation
void setChatBackgroundImage(
ImageProvider image, {
BoxFit fit = BoxFit.cover,
Alignment alignment = Alignment.center,
ColorFilter? colorFilter,
double opacity = 1.0,
bool showEmptyText = true,
}) {
chatBackgroundDecoration = BoxDecoration(
image: DecorationImage(
image: image,
fit: fit,
alignment: alignment,
colorFilter: colorFilter,
opacity: opacity,
),
);
showEmptyChatState = showEmptyText;
notifyListeners();
}