chore: run dartfmt on /theme
This commit is contained in:
@@ -56,7 +56,7 @@ class ChannelPreviewTheme {
|
|||||||
title: title?.merge(other.title) ?? other.title,
|
title: title?.merge(other.title) ?? other.title,
|
||||||
subtitle: subtitle?.merge(other.subtitle) ?? other.subtitle,
|
subtitle: subtitle?.merge(other.subtitle) ?? other.subtitle,
|
||||||
lastMessageAt:
|
lastMessageAt:
|
||||||
lastMessageAt?.merge(other.lastMessageAt) ?? other.lastMessageAt,
|
lastMessageAt?.merge(other.lastMessageAt) ?? other.lastMessageAt,
|
||||||
avatarTheme: avatarTheme?.merge(other.avatarTheme) ?? other.avatarTheme,
|
avatarTheme: avatarTheme?.merge(other.avatarTheme) ?? other.avatarTheme,
|
||||||
unreadCounterColor: other.unreadCounterColor,
|
unreadCounterColor: other.unreadCounterColor,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ class GalleryHeaderTheme extends InheritedTheme {
|
|||||||
/// ```
|
/// ```
|
||||||
static GalleryHeaderThemeData of(BuildContext context) {
|
static GalleryHeaderThemeData of(BuildContext context) {
|
||||||
final galleryHeaderTheme =
|
final galleryHeaderTheme =
|
||||||
context.dependOnInheritedWidgetOfExactType<GalleryHeaderTheme>();
|
context.dependOnInheritedWidgetOfExactType<GalleryHeaderTheme>();
|
||||||
return galleryHeaderTheme?.data ??
|
return galleryHeaderTheme?.data ??
|
||||||
StreamChatTheme.of(context).galleryHeaderTheme;
|
StreamChatTheme.of(context).galleryHeaderTheme;
|
||||||
}
|
}
|
||||||
@@ -108,27 +108,27 @@ class GalleryHeaderThemeData with Diagnosticable {
|
|||||||
titleTextStyle: titleTextStyle ?? this.titleTextStyle,
|
titleTextStyle: titleTextStyle ?? this.titleTextStyle,
|
||||||
subtitleTextStyle: subtitleTextStyle ?? this.subtitleTextStyle,
|
subtitleTextStyle: subtitleTextStyle ?? this.subtitleTextStyle,
|
||||||
bottomSheetBarrierColor:
|
bottomSheetBarrierColor:
|
||||||
bottomSheetBarrierColor ?? this.bottomSheetBarrierColor,
|
bottomSheetBarrierColor ?? this.bottomSheetBarrierColor,
|
||||||
);
|
);
|
||||||
|
|
||||||
/// Linearly interpolate between two [GalleryHeader] themes.
|
/// Linearly interpolate between two [GalleryHeader] themes.
|
||||||
///
|
///
|
||||||
/// All the properties must be non-null.
|
/// All the properties must be non-null.
|
||||||
GalleryHeaderThemeData lerp(
|
GalleryHeaderThemeData lerp(
|
||||||
GalleryHeaderThemeData a,
|
GalleryHeaderThemeData a,
|
||||||
GalleryHeaderThemeData b,
|
GalleryHeaderThemeData b,
|
||||||
double t,
|
double t,
|
||||||
) =>
|
) =>
|
||||||
GalleryHeaderThemeData(
|
GalleryHeaderThemeData(
|
||||||
closeButtonColor: Color.lerp(a.closeButtonColor, b.closeButtonColor, t),
|
closeButtonColor: Color.lerp(a.closeButtonColor, b.closeButtonColor, t),
|
||||||
backgroundColor: Color.lerp(a.backgroundColor, b.backgroundColor, t),
|
backgroundColor: Color.lerp(a.backgroundColor, b.backgroundColor, t),
|
||||||
iconMenuPointColor:
|
iconMenuPointColor:
|
||||||
Color.lerp(a.iconMenuPointColor, b.iconMenuPointColor, t),
|
Color.lerp(a.iconMenuPointColor, b.iconMenuPointColor, t),
|
||||||
titleTextStyle: TextStyle.lerp(a.titleTextStyle, b.titleTextStyle, t),
|
titleTextStyle: TextStyle.lerp(a.titleTextStyle, b.titleTextStyle, t),
|
||||||
subtitleTextStyle:
|
subtitleTextStyle:
|
||||||
TextStyle.lerp(a.subtitleTextStyle, b.subtitleTextStyle, t),
|
TextStyle.lerp(a.subtitleTextStyle, b.subtitleTextStyle, t),
|
||||||
bottomSheetBarrierColor:
|
bottomSheetBarrierColor:
|
||||||
Color.lerp(a.bottomSheetBarrierColor, b.bottomSheetBarrierColor, t),
|
Color.lerp(a.bottomSheetBarrierColor, b.bottomSheetBarrierColor, t),
|
||||||
);
|
);
|
||||||
|
|
||||||
/// Merges one [GalleryHeaderThemeData] with the another
|
/// Merges one [GalleryHeaderThemeData] with the another
|
||||||
@@ -147,14 +147,14 @@ class GalleryHeaderThemeData with Diagnosticable {
|
|||||||
@override
|
@override
|
||||||
bool operator ==(Object other) =>
|
bool operator ==(Object other) =>
|
||||||
identical(this, other) ||
|
identical(this, other) ||
|
||||||
other is GalleryHeaderThemeData &&
|
other is GalleryHeaderThemeData &&
|
||||||
runtimeType == other.runtimeType &&
|
runtimeType == other.runtimeType &&
|
||||||
closeButtonColor == other.closeButtonColor &&
|
closeButtonColor == other.closeButtonColor &&
|
||||||
backgroundColor == other.backgroundColor &&
|
backgroundColor == other.backgroundColor &&
|
||||||
iconMenuPointColor == other.iconMenuPointColor &&
|
iconMenuPointColor == other.iconMenuPointColor &&
|
||||||
titleTextStyle == other.titleTextStyle &&
|
titleTextStyle == other.titleTextStyle &&
|
||||||
subtitleTextStyle == other.subtitleTextStyle &&
|
subtitleTextStyle == other.subtitleTextStyle &&
|
||||||
bottomSheetBarrierColor == other.bottomSheetBarrierColor;
|
bottomSheetBarrierColor == other.bottomSheetBarrierColor;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode =>
|
int get hashCode =>
|
||||||
|
|||||||
@@ -72,12 +72,12 @@ class MessageInputTheme {
|
|||||||
}) =>
|
}) =>
|
||||||
MessageInputTheme(
|
MessageInputTheme(
|
||||||
sendAnimationDuration:
|
sendAnimationDuration:
|
||||||
sendAnimationDuration ?? this.sendAnimationDuration,
|
sendAnimationDuration ?? this.sendAnimationDuration,
|
||||||
inputBackground: inputBackground ?? this.inputBackground,
|
inputBackground: inputBackground ?? this.inputBackground,
|
||||||
actionButtonColor: actionButtonColor ?? this.actionButtonColor,
|
actionButtonColor: actionButtonColor ?? this.actionButtonColor,
|
||||||
sendButtonColor: sendButtonColor ?? this.sendButtonColor,
|
sendButtonColor: sendButtonColor ?? this.sendButtonColor,
|
||||||
actionButtonIdleColor:
|
actionButtonIdleColor:
|
||||||
actionButtonIdleColor ?? this.actionButtonIdleColor,
|
actionButtonIdleColor ?? this.actionButtonIdleColor,
|
||||||
expandButtonColor: expandButtonColor ?? this.expandButtonColor,
|
expandButtonColor: expandButtonColor ?? this.expandButtonColor,
|
||||||
inputTextStyle: inputTextStyle ?? this.inputTextStyle,
|
inputTextStyle: inputTextStyle ?? this.inputTextStyle,
|
||||||
sendButtonIdleColor: sendButtonIdleColor ?? this.sendButtonIdleColor,
|
sendButtonIdleColor: sendButtonIdleColor ?? this.sendButtonIdleColor,
|
||||||
@@ -98,7 +98,7 @@ class MessageInputTheme {
|
|||||||
sendButtonColor: other.sendButtonColor,
|
sendButtonColor: other.sendButtonColor,
|
||||||
sendButtonIdleColor: other.sendButtonIdleColor,
|
sendButtonIdleColor: other.sendButtonIdleColor,
|
||||||
inputTextStyle:
|
inputTextStyle:
|
||||||
inputTextStyle?.merge(other.inputTextStyle) ?? other.inputTextStyle,
|
inputTextStyle?.merge(other.inputTextStyle) ?? other.inputTextStyle,
|
||||||
inputDecoration: inputDecoration?.merge(other.inputDecoration) ??
|
inputDecoration: inputDecoration?.merge(other.inputDecoration) ??
|
||||||
other.inputDecoration,
|
other.inputDecoration,
|
||||||
activeBorderGradient: other.activeBorderGradient,
|
activeBorderGradient: other.activeBorderGradient,
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ class MessageListViewTheme extends InheritedTheme {
|
|||||||
/// ```
|
/// ```
|
||||||
static MessageListViewThemeData of(BuildContext context) {
|
static MessageListViewThemeData of(BuildContext context) {
|
||||||
final messageListViewTheme =
|
final messageListViewTheme =
|
||||||
context.dependOnInheritedWidgetOfExactType<MessageListViewTheme>();
|
context.dependOnInheritedWidgetOfExactType<MessageListViewTheme>();
|
||||||
return messageListViewTheme?.data ??
|
return messageListViewTheme?.data ??
|
||||||
StreamChatTheme.of(context).messageListViewTheme;
|
StreamChatTheme.of(context).messageListViewTheme;
|
||||||
}
|
}
|
||||||
@@ -77,10 +77,10 @@ class MessageListViewThemeData with Diagnosticable {
|
|||||||
///
|
///
|
||||||
/// All the properties must be non-null.
|
/// All the properties must be non-null.
|
||||||
MessageListViewThemeData lerp(
|
MessageListViewThemeData lerp(
|
||||||
MessageListViewThemeData a,
|
MessageListViewThemeData a,
|
||||||
MessageListViewThemeData b,
|
MessageListViewThemeData b,
|
||||||
double t,
|
double t,
|
||||||
) =>
|
) =>
|
||||||
MessageListViewThemeData(
|
MessageListViewThemeData(
|
||||||
backgroundColor: Color.lerp(a.backgroundColor, b.backgroundColor, t),
|
backgroundColor: Color.lerp(a.backgroundColor, b.backgroundColor, t),
|
||||||
);
|
);
|
||||||
@@ -96,9 +96,9 @@ class MessageListViewThemeData with Diagnosticable {
|
|||||||
@override
|
@override
|
||||||
bool operator ==(Object other) =>
|
bool operator ==(Object other) =>
|
||||||
identical(this, other) ||
|
identical(this, other) ||
|
||||||
other is MessageListViewThemeData &&
|
other is MessageListViewThemeData &&
|
||||||
runtimeType == other.runtimeType &&
|
runtimeType == other.runtimeType &&
|
||||||
backgroundColor == other.backgroundColor;
|
backgroundColor == other.backgroundColor;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode => backgroundColor.hashCode;
|
int get hashCode => backgroundColor.hashCode;
|
||||||
|
|||||||
Reference in New Issue
Block a user