Skip to content

Commit

Permalink
Change background of chat view
Browse files Browse the repository at this point in the history
  • Loading branch information
hoangdat committed Oct 16, 2024
1 parent 6b8c520 commit 959b7e1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/pages/chat/chat_view_body.dart
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class ChatViewBody extends StatelessWidget with MessageContentMixin {
),
Expanded(
child: Container(
color: LinagoraRefColors.material().tertiary[99],
color: ChatViewBodyStyle.chatViewBackgroundColor(context),
child: GestureDetector(
onTap: controller.clearSingleSelectedEvent,
child: ValueListenableBuilder(
Expand Down Expand Up @@ -215,13 +215,13 @@ class ChatViewBody extends StatelessWidget with MessageContentMixin {
const ConnectionStatusHeader(),
// Currently we can't support reactions
// ReactionsPicker(controller),
const SizedBox(height: 6.0),
const SizedBox(height: 8.0),
Padding(
padding: ChatViewBodyStyle.inputBarPadding(context),
child: ChatInputRow(controller),
),
SizedBox(
height: controller.responsive.isMobile(context) ? 8.0 : 16.0,
height: controller.responsive.isMobile(context) ? 8.0 : 8.0,
),
].map(
(widget) => widget,
Expand Down
6 changes: 6 additions & 0 deletions lib/pages/chat/chat_view_body_style.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'package:fluffychat/config/themes.dart';
import 'package:fluffychat/di/global/get_it_initializer.dart';
import 'package:fluffychat/utils/responsive/responsive_utils.dart';
import 'package:flutter/material.dart';
import 'package:linagora_design_flutter/colors/linagora_sys_colors.dart';

class ChatViewBodyStyle {
static ResponsiveUtils responsive = getIt.get<ResponsiveUtils>();
Expand All @@ -12,6 +13,11 @@ class ChatViewBodyStyle {

static double dividerSize = 1.0;

static Color chatViewBackgroundColor(BuildContext context) =>
responsive.isMobile(context)
? LinagoraSysColors.material().background
: LinagoraSysColors.material().onPrimary;

static EdgeInsets inputBarPadding(BuildContext context) => EdgeInsets.only(
left: 8.0,
right: responsive.isMobile(context) ? 16.0 : 8.0,
Expand Down

0 comments on commit 959b7e1

Please sign in to comment.