fix(ui): Make the send button's bottom padding adhere to the pickers

This commit is contained in:
PapaTutuWawa 2022-12-16 22:54:31 +01:00
parent eba17880d0
commit 1cd3dabcea

View File

@ -273,15 +273,19 @@ class ConversationBottomRowState extends State<ConversationBottomRow> {
), ),
), ),
Positioned( BlocBuilder<ConversationBloc, ConversationState>(
right: 8,
bottom: 8,
child: BlocBuilder<ConversationBloc, ConversationState>(
buildWhen: (prev, next) => prev.sendButtonState != next.sendButtonState || buildWhen: (prev, next) => prev.sendButtonState != next.sendButtonState ||
prev.isDragging != next.isDragging || prev.isDragging != next.isDragging ||
prev.isLocked != next.isLocked, prev.isLocked != next.isLocked ||
prev.emojiPickerVisible != next.emojiPickerVisible ||
prev.stickerPickerVisible != next.stickerPickerVisible,
builder: (context, state) { builder: (context, state) {
return Visibility( return Positioned(
right: 8,
bottom: state.emojiPickerVisible || state.stickerPickerVisible ?
258 /* 8 (Regular padding) + 250 (Height of the pickers) */ :
8,
child: Visibility(
visible: !state.isDragging && !state.isLocked, visible: !state.isDragging && !state.isLocked,
child: LongPressDraggable<int>( child: LongPressDraggable<int>(
data: 1, data: 1,
@ -359,10 +363,10 @@ class ConversationBottomRowState extends State<ConversationBottomRow> {
), ),
), ),
), ),
),
); );
}, },
), ),
),
Positioned( Positioned(
left: 8, left: 8,