Skip to content

Commit

Permalink
hotfix: center chat details
Browse files Browse the repository at this point in the history
  • Loading branch information
Julian KOUNE authored and hoangdat committed Nov 8, 2023
1 parent 71685c1 commit 5b79b6b
Showing 1 changed file with 42 additions and 39 deletions.
81 changes: 42 additions & 39 deletions lib/pages/chat_details/chat_details_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -89,45 +89,48 @@ class ChatDetailsView extends StatelessWidget {
sliver: SliverAppBar(
toolbarHeight:
ChatDetailViewStyle.toolbarHeightSliverAppBar,
title: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: [
_groupAvatarBuilder(
context: context,
room: controller.room!,
),
_groupNameAndInfoBuilder(
context: context,
room: controller.room!,
),
ValueListenableBuilder(
valueListenable: controller.muteNotifier,
builder: (context, pushRuleState, child) {
final buttons =
controller.chatDetailsActionsButton();

return ActionsHeaderBuilder(
actions: buttons,
width: ChatDetailViewStyle.actionsHeaderWidth(
context,
),
buttonColor: !controller.isMobileAndTablet
? LinagoraRefColors.material().primary[100]
: null,
borderSide: BorderSide(
width: 1,
color: controller.isMobileAndTablet
? LinagoraRefColors.material().neutral[90]!
: Colors.transparent,
),
onTap: (actions) => controller.onTapActionsButton(
actions,
),
);
},
),
],
title: Center(
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: [
_groupAvatarBuilder(
context: context,
room: controller.room!,
),
_groupNameAndInfoBuilder(
context: context,
room: controller.room!,
),
ValueListenableBuilder(
valueListenable: controller.muteNotifier,
builder: (context, pushRuleState, child) {
final buttons =
controller.chatDetailsActionsButton();
return ActionsHeaderBuilder(
actions: buttons,
width: ChatDetailViewStyle.actionsHeaderWidth(
context,
),
buttonColor: !controller.isMobileAndTablet
? LinagoraRefColors.material().primary[100]
: null,
borderSide: BorderSide(
width: 1,
color: controller.isMobileAndTablet
? LinagoraRefColors.material()
.neutral[90]!
: Colors.transparent,
),
onTap: (actions) =>
controller.onTapActionsButton(
actions,
),
);
},
),
],
),
),
automaticallyImplyLeading: false,
pinned: true,
Expand Down

0 comments on commit 5b79b6b

Please sign in to comment.