Skip to content

Commit 60de977

Browse files
committed
CursorBot comments fix
1 parent 4f05105 commit 60de977

File tree

4 files changed

+15
-9
lines changed

4 files changed

+15
-9
lines changed

packages/flutter_chat_core/lib/src/theme/chat_theme.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ abstract class ChatColors with _$ChatColors {
125125
surfaceContainerLow: themeData.colorScheme.surfaceContainerLow,
126126
surfaceContainer: themeData.colorScheme.surfaceContainer,
127127
surfaceContainerHigh: themeData.colorScheme.surfaceContainerHigh,
128-
surfaceContainerHighest: themeData.colorScheme.surfaceContainerHigh,
128+
surfaceContainerHighest: themeData.colorScheme.surfaceContainerHighest,
129129
);
130130

131131
/// Merges this color scheme with another [ChatColors].

packages/flutter_chat_ui/lib/src/chat_message/chat_message.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,12 @@ class ChatMessage extends StatelessWidget {
167167
index: index,
168168
isSentByMe: isSentByMe,
169169
),
170-
onLongPress: () {
170+
onLongPressStart: (details) {
171171
onMessageLongPress?.call(
172172
context,
173173
message,
174174
index: index,
175-
details: LongPressStartDetails(),
175+
details: details,
176176
isSentByMe: isSentByMe,
177177
);
178178
return;

packages/flyer_chat_reactions/lib/src/widgets/flyer_chat_reactions_row.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ class _FlyerChatReactionsRowState extends State<FlyerChatReactionsRow> {
108108
final widgetCount = reactions.length;
109109

110110
for (var i = 0; i < widgetCount; i++) {
111-
final nextSize = ReactionTileSizeHelper.calculatePrefferedSize(
111+
final nextSize = ReactionTileSizeHelper.calculatePreferredSize(
112112
emojiStyle: emojiTextStyle,
113113
countTextStyle: countTextStyle,
114114
extraTextStyle: extraTextStyle,
@@ -178,7 +178,7 @@ class _FlyerChatReactionsRowState extends State<FlyerChatReactionsRow> {
178178

179179
Size? surplusWidgetSize;
180180
if (souldDisplaySurplus) {
181-
surplusWidgetSize = ReactionTileSizeHelper.calculatePrefferedSize(
181+
surplusWidgetSize = ReactionTileSizeHelper.calculatePreferredSize(
182182
emojiStyle: emojiTextStyle,
183183
countTextStyle: countTextStyle,
184184
extraTextStyle: extraTextStyle,

packages/flyer_chat_reactions/lib/src/widgets/reaction_tile.dart

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,9 @@ class _ReactionTileState extends State<ReactionTile> {
160160
mainAxisSize: MainAxisSize.min,
161161
children: [
162162
if (widget.emoji != null)
163-
/// Emoji alignement issue https://github.com/flutter/flutter/issues/119623
163+
/// Emoji alignment issue https://github.com/flutter/flutter/issues/119623
164164
Padding(
165-
padding: EdgeInsets.fromLTRB(2.5, 0, 0, 1.5),
165+
padding: ReactionTileConstants.emojiAlignmentPadding,
166166
child: Text(
167167
widget.emoji!,
168168
style: ReactionTileStyleResolver.resolveEmojiTextStyle(
@@ -206,6 +206,12 @@ class ReactionTileConstants {
206206
static const double minimumWidth = 40;
207207
static const double horizontalPadding = 8;
208208
static const double height = 24;
209+
static const EdgeInsets emojiAlignmentPadding = EdgeInsets.fromLTRB(
210+
2.5,
211+
0,
212+
0,
213+
1.5,
214+
);
209215
}
210216

211217
class ReactionTileCountTextHelper {
@@ -221,7 +227,7 @@ class ReactionTileSizeHelper {
221227
/// and the number of reactions that can fit in the available width.
222228
///
223229
224-
static Size calculatePrefferedSize({
230+
static Size calculatePreferredSize({
225231
required TextStyle emojiStyle,
226232
required TextStyle countTextStyle,
227233
required TextStyle extraTextStyle,
@@ -239,7 +245,7 @@ class ReactionTileSizeHelper {
239245

240246
if (hasEmoji) {
241247
width += emojiStyle.fontSize ?? 12;
242-
width += 2.5; // See emoji alignement
248+
width += 2.5; // See emoji alignment
243249
}
244250
if (hasText) {
245251
if (width > 0) {

0 commit comments

Comments
 (0)