Skip to content

Commit

Permalink
Apply new text style for chat details
Browse files Browse the repository at this point in the history
  • Loading branch information
nqhhdev authored and hoangdat committed Sep 7, 2023
1 parent 3674d8f commit e5afb52
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 18 deletions.
27 changes: 10 additions & 17 deletions lib/pages/chat_details/chat_details_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,30 +37,17 @@ class ChatDetailsView extends StatelessWidget {
return Scaffold(
backgroundColor: controller.isMobileAndTablet
? Theme.of(context).colorScheme.background
: Theme.of(context).colorScheme.surface,
: Theme.of(context).colorScheme.surfaceVariant,
appBar: AppBar(
automaticallyImplyLeading: false,
toolbarHeight: ChatDetailViewStyle.toolbarHeight,
toolbarHeight: ChatDetailViewStyle.toolbarHeight(context),
bottom: PreferredSize(
preferredSize: const Size.fromHeight(1),
child: Container(
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(color: Colors.black.withOpacity(0.15)),
),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.08),
offset: const Offset(0, 1),
blurRadius: 80,
),
BoxShadow(
color: Colors.black.withOpacity(0.15),
offset: const Offset(0, 1),
blurRadius: 3,
spreadRadius: 0.5,
),
],
),
),
),
Expand All @@ -83,7 +70,7 @@ class ChatDetailsView extends StatelessWidget {
L10n.of(context)!.chatInfo,
textAlign: TextAlign.center,
style: Theme.of(context).textTheme.titleLarge?.copyWith(
color: Theme.of(context).colorScheme.onSurface,
color: Theme.of(context).colorScheme.onBackground,
),
),
),
Expand All @@ -109,6 +96,12 @@ class ChatDetailsView extends StatelessWidget {
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,
),
Expand All @@ -123,7 +116,7 @@ class ChatDetailsView extends StatelessWidget {
child: Container(
width: ChatDetailViewStyle.chatDetailsPageViewWebWidth,
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.background,
color: LinagoraRefColors.material().primary[100],
),
child: ValueListenableBuilder(
valueListenable: controller.currentPage,
Expand Down
3 changes: 2 additions & 1 deletion lib/pages/chat_details/chat_details_view_style.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import 'package:flutter/cupertino.dart';
class ChatDetailViewStyle {
static ResponsiveUtils responsive = getIt.get<ResponsiveUtils>();

static double toolbarHeight = 56;
static double toolbarHeight(BuildContext context) =>
responsive.isMobile(context) ? 56 : 80;

static double actionsHeaderWidth(BuildContext context) =>
responsive.isMobile(context) || responsive.isTablet(context) ? 98 : 148;
Expand Down

0 comments on commit e5afb52

Please sign in to comment.