@@ -2,6 +2,7 @@ import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// A style that overrides the default appearance of various avatar widgets.
|
||||
// ignore: prefer-match-file-name
|
||||
class AvatarThemeData with Diagnosticable {
|
||||
/// Creates an [AvatarThemeData].
|
||||
const AvatarThemeData({
|
||||
|
||||
@@ -25,13 +25,23 @@ class ColorTheme {
|
||||
stops: [0, 1],
|
||||
),
|
||||
this.borderTop = const Effect(
|
||||
sigmaX: 0, sigmaY: -1, color: Color(0xff000000), blur: 0, alpha: 0.08),
|
||||
sigmaX: 0,
|
||||
sigmaY: -1,
|
||||
color: Color(0xff000000),
|
||||
blur: 0,
|
||||
alpha: 0.08,
|
||||
),
|
||||
this.borderBottom = const Effect(
|
||||
sigmaX: 0, sigmaY: 1, color: Color(0xff000000), blur: 0, alpha: 0.08),
|
||||
sigmaX: 0,
|
||||
sigmaY: 1,
|
||||
color: Color(0xff000000),
|
||||
blur: 0,
|
||||
alpha: 0.08,
|
||||
),
|
||||
this.shadowIconButton = const Effect(
|
||||
sigmaX: 0, sigmaY: 2, color: Color(0xff000000), alpha: 0.5, blur: 4),
|
||||
sigmaX: 0, sigmaY: 2, color: Color(0xff000000), alpha: 0.5, blur: 4,),
|
||||
this.modalShadow = const Effect(
|
||||
sigmaX: 0, sigmaY: 0, color: Color(0xff000000), alpha: 1, blur: 8),
|
||||
sigmaX: 0, sigmaY: 0, color: Color(0xff000000), alpha: 1, blur: 8,),
|
||||
}) : brightness = Brightness.light;
|
||||
|
||||
/// Initialise with dark theme
|
||||
|
||||
@@ -151,11 +151,20 @@ class GalleryFooterThemeData with Diagnosticable {
|
||||
bottomSheetBarrierColor:
|
||||
Color.lerp(a.bottomSheetBarrierColor, b.bottomSheetBarrierColor, t),
|
||||
bottomSheetBackgroundColor: Color.lerp(
|
||||
a.bottomSheetBackgroundColor, b.bottomSheetBackgroundColor, t),
|
||||
a.bottomSheetBackgroundColor,
|
||||
b.bottomSheetBackgroundColor,
|
||||
t,
|
||||
),
|
||||
bottomSheetPhotosTextStyle: TextStyle.lerp(
|
||||
a.bottomSheetPhotosTextStyle, b.bottomSheetPhotosTextStyle, t),
|
||||
a.bottomSheetPhotosTextStyle,
|
||||
b.bottomSheetPhotosTextStyle,
|
||||
t,
|
||||
),
|
||||
bottomSheetCloseIconColor: Color.lerp(
|
||||
a.bottomSheetCloseIconColor, b.bottomSheetCloseIconColor, t),
|
||||
a.bottomSheetCloseIconColor,
|
||||
b.bottomSheetCloseIconColor,
|
||||
t,
|
||||
),
|
||||
);
|
||||
|
||||
/// Merges one [GalleryFooterThemeData] with another.
|
||||
@@ -208,10 +217,16 @@ class GalleryFooterThemeData with Diagnosticable {
|
||||
..add(ColorProperty('gridIconButtonColor', gridIconButtonColor))
|
||||
..add(ColorProperty('bottomSheetBarrierColor', bottomSheetBarrierColor))
|
||||
..add(ColorProperty(
|
||||
'bottomSheetBackgroundColor', bottomSheetBackgroundColor))
|
||||
'bottomSheetBackgroundColor',
|
||||
bottomSheetBackgroundColor,
|
||||
))
|
||||
..add(DiagnosticsProperty(
|
||||
'bottomSheetPhotosTextStyle', bottomSheetPhotosTextStyle))
|
||||
'bottomSheetPhotosTextStyle',
|
||||
bottomSheetPhotosTextStyle,
|
||||
))
|
||||
..add(ColorProperty(
|
||||
'bottomSheetCloseIconColor', bottomSheetCloseIconColor));
|
||||
'bottomSheetCloseIconColor',
|
||||
bottomSheetCloseIconColor,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:stream_chat_flutter/src/theme/avatar_theme.dart';
|
||||
|
||||
/// Class for getting message theme
|
||||
// ignore: prefer-match-file-name
|
||||
class MessageThemeData with Diagnosticable {
|
||||
/// Creates a [MessageThemeData].
|
||||
const MessageThemeData({
|
||||
@@ -99,7 +100,7 @@ class MessageThemeData with Diagnosticable {
|
||||
messageTextStyle:
|
||||
TextStyle.lerp(a.messageTextStyle, b.messageTextStyle, t),
|
||||
reactionsBackgroundColor: Color.lerp(
|
||||
a.reactionsBackgroundColor, b.reactionsBackgroundColor, t),
|
||||
a.reactionsBackgroundColor, b.reactionsBackgroundColor, t,),
|
||||
reactionsBorderColor:
|
||||
Color.lerp(a.messageBorderColor, b.reactionsBorderColor, t),
|
||||
reactionsMaskColor:
|
||||
|
||||
Reference in New Issue
Block a user