added properties
This commit is contained in:
@@ -66,6 +66,9 @@ class MessageInputThemeData with Diagnosticable {
|
||||
this.borderRadius,
|
||||
this.expandButtonColor,
|
||||
this.linkHighlightColor,
|
||||
this.enableSafeArea,
|
||||
this.elevation,
|
||||
this.shadow,
|
||||
});
|
||||
|
||||
/// Duration of the [MessageInput] send button animation
|
||||
@@ -107,6 +110,15 @@ class MessageInputThemeData with Diagnosticable {
|
||||
/// Border radius of [MessageInput]
|
||||
final BorderRadius? borderRadius;
|
||||
|
||||
/// Wrap [MessageInput] with a [SafeArea widget]
|
||||
final bool? enableSafeArea;
|
||||
|
||||
/// Elevation of the [MessageInput]
|
||||
final double? elevation;
|
||||
|
||||
/// Shadow for the [MessageInput] widget
|
||||
final BoxShadow? shadow;
|
||||
|
||||
/// Returns a new [MessageInputThemeData] replacing some of its properties
|
||||
MessageInputThemeData copyWith({
|
||||
Duration? sendAnimationDuration,
|
||||
@@ -122,6 +134,9 @@ class MessageInputThemeData with Diagnosticable {
|
||||
Gradient? activeBorderGradient,
|
||||
Gradient? idleBorderGradient,
|
||||
BorderRadius? borderRadius,
|
||||
bool? enableSafeArea,
|
||||
double? elevation,
|
||||
BoxShadow? shadow,
|
||||
}) =>
|
||||
MessageInputThemeData(
|
||||
sendAnimationDuration:
|
||||
@@ -139,6 +154,9 @@ class MessageInputThemeData with Diagnosticable {
|
||||
idleBorderGradient: idleBorderGradient ?? this.idleBorderGradient,
|
||||
borderRadius: borderRadius ?? this.borderRadius,
|
||||
linkHighlightColor: linkHighlightColor ?? this.linkHighlightColor,
|
||||
enableSafeArea: enableSafeArea ?? this.enableSafeArea,
|
||||
elevation: elevation ?? this.elevation,
|
||||
shadow: shadow ?? this.shadow,
|
||||
);
|
||||
|
||||
/// Linearly interpolate from one [MessageInputThemeData] to another.
|
||||
@@ -169,6 +187,9 @@ class MessageInputThemeData with Diagnosticable {
|
||||
inputDecoration: a.inputDecoration,
|
||||
linkHighlightColor:
|
||||
Color.lerp(a.linkHighlightColor, b.linkHighlightColor, t),
|
||||
enableSafeArea: a.enableSafeArea,
|
||||
elevation: Tween(begin: a.elevation, end: b.elevation).transform(t),
|
||||
shadow: BoxShadow.lerp(a.shadow, b.shadow, t),
|
||||
);
|
||||
|
||||
/// Merges [this] [MessageInputThemeData] with the [other]
|
||||
@@ -190,6 +211,9 @@ class MessageInputThemeData with Diagnosticable {
|
||||
borderRadius: other.borderRadius,
|
||||
expandButtonColor: other.expandButtonColor,
|
||||
linkHighlightColor: other.linkHighlightColor,
|
||||
enableSafeArea: other.enableSafeArea,
|
||||
elevation: other.elevation,
|
||||
shadow: other.shadow,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -210,7 +234,10 @@ class MessageInputThemeData with Diagnosticable {
|
||||
idleBorderGradient == other.idleBorderGradient &&
|
||||
activeBorderGradient == other.activeBorderGradient &&
|
||||
borderRadius == other.borderRadius &&
|
||||
linkHighlightColor == other.linkHighlightColor;
|
||||
linkHighlightColor == other.linkHighlightColor &&
|
||||
enableSafeArea == other.enableSafeArea &&
|
||||
elevation == other.elevation &&
|
||||
shadow == other.shadow;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
@@ -226,7 +253,10 @@ class MessageInputThemeData with Diagnosticable {
|
||||
idleBorderGradient.hashCode ^
|
||||
activeBorderGradient.hashCode ^
|
||||
borderRadius.hashCode ^
|
||||
linkHighlightColor.hashCode;
|
||||
linkHighlightColor.hashCode ^
|
||||
elevation.hashCode ^
|
||||
shadow.hashCode ^
|
||||
enableSafeArea.hashCode;
|
||||
|
||||
@override
|
||||
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
|
||||
@@ -244,6 +274,9 @@ class MessageInputThemeData with Diagnosticable {
|
||||
..add(DiagnosticsProperty('idleBorderGradient', idleBorderGradient))
|
||||
..add(DiagnosticsProperty('borderRadius', borderRadius))
|
||||
..add(ColorProperty('expandButtonColor', expandButtonColor))
|
||||
..add(ColorProperty('linkHighlightColor', linkHighlightColor));
|
||||
..add(ColorProperty('linkHighlightColor', linkHighlightColor))
|
||||
..add(DiagnosticsProperty('elevation', elevation))
|
||||
..add(DiagnosticsProperty('shadow', shadow))
|
||||
..add(DiagnosticsProperty('enableSafeArea', enableSafeArea));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user