Skip to content

Commit

Permalink
TW-1202: Update background color for wrong screen
Browse files Browse the repository at this point in the history
  • Loading branch information
nqhhdev authored and hoangdat committed Jan 15, 2024
1 parent 0b85ed6 commit ecf7632
Show file tree
Hide file tree
Showing 17 changed files with 74 additions and 39 deletions.
3 changes: 3 additions & 0 deletions lib/pages/chat/chat_pinned_events/pinned_messages_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import 'package:fluffychat/widgets/twake_components/twake_icon_button.dart';
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:linagora_design_flutter/linagora_design_flutter.dart';
import 'package:matrix/matrix.dart';

class PinnedMessagesScreen extends StatelessWidget {
Expand All @@ -19,7 +20,9 @@ class PinnedMessagesScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: LinagoraSysColors.material().onPrimary,
appBar: AppBar(
backgroundColor: LinagoraSysColors.material().onPrimary,
title: ValueListenableBuilder(
valueListenable: controller.eventsNotifier,
builder: (context, events, child) {
Expand Down
6 changes: 3 additions & 3 deletions lib/pages/chat_details/chat_details_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ class ChatDetailsView extends StatelessWidget {
Widget build(BuildContext context) {
if (controller.room == null) {
return Scaffold(
backgroundColor: LinagoraSysColors.material().onPrimary,
appBar: AppBar(
backgroundColor: LinagoraSysColors.material().onPrimary,
title: Text(L10n.of(context)!.oopsSomethingWentWrong),
),
body: Center(
Expand Down Expand Up @@ -93,6 +95,7 @@ class ChatDetailsView extends StatelessWidget {
handle:
NestedScrollView.sliverOverlapAbsorberHandleFor(context),
sliver: SliverAppBar(
backgroundColor: LinagoraSysColors.material().onPrimary,
toolbarHeight:
ChatDetailViewStyle.toolbarHeightSliverAppBar,
title: Column(
Expand Down Expand Up @@ -222,9 +225,6 @@ class ChatDetailsView extends StatelessWidget {
child: Container(
width: ChatDetailViewStyle.chatDetailsPageViewWebWidth,
padding: ChatDetailViewStyle.paddingTabBarView,
decoration: BoxDecoration(
color: LinagoraRefColors.material().primary[100],
),
child: TabBarView(
physics: const NeverScrollableScrollPhysics(),
controller: controller.tabController,
Expand Down
2 changes: 2 additions & 0 deletions lib/pages/device_settings/device_settings_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import 'package:flutter_gen/gen_l10n/l10n.dart';

import 'package:fluffychat/pages/device_settings/device_settings.dart';
import 'package:fluffychat/widgets/layouts/max_width_body.dart';
import 'package:linagora_design_flutter/linagora_design_flutter.dart';
import 'user_device_list_item.dart';

class DevicesSettingsView extends StatelessWidget {
Expand All @@ -15,6 +16,7 @@ class DevicesSettingsView extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: LinagoraSysColors.material().onPrimary,
appBar: SettingsAppBar(
context: context,
title: Text(
Expand Down
65 changes: 35 additions & 30 deletions lib/pages/new_private_chat/new_private_chat_view.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:fluffychat/pages/new_group/contacts_selection_view_style.dart';
import 'package:fluffychat/pages/new_private_chat/new_private_chat.dart';
import 'package:fluffychat/pages/new_private_chat/widget/expansion_list.dart';
import 'package:fluffychat/utils/platform_infos.dart';
Expand All @@ -14,37 +15,41 @@ class NewPrivateChatView extends StatelessWidget {

@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: LinagoraSysColors.material().onPrimary,
appBar: PreferredSize(
preferredSize: SearchableAppBarStyle.preferredSize(context),
child: SearchableAppBar(
title: L10n.of(context)!.newChat,
searchModeNotifier: controller.isSearchModeNotifier,
textEditingController: controller.textEditingController,
openSearchBar: controller.openSearchBar,
closeSearchBar: controller.closeSearchBar,
focusNode: controller.searchFocusNode,
return Padding(
padding: ContactsSelectionViewStyle.parentPadding,
child: Scaffold(
backgroundColor: LinagoraSysColors.material().onPrimary,
appBar: PreferredSize(
preferredSize: SearchableAppBarStyle.preferredSize(context),
child: SearchableAppBar(
title: L10n.of(context)!.newChat,
searchModeNotifier: controller.isSearchModeNotifier,
textEditingController: controller.textEditingController,
openSearchBar: controller.openSearchBar,
closeSearchBar: controller.closeSearchBar,
focusNode: controller.searchFocusNode,
),
),
),
body: SingleChildScrollView(
keyboardDismissBehavior: PlatformInfos.isMobile
? ScrollViewKeyboardDismissBehavior.manual
: ScrollViewKeyboardDismissBehavior.onDrag,
padding: const EdgeInsets.only(left: 8.0, right: 10.0),
controller: controller.scrollController,
child: ExpansionList(
presentationContactsNotifier: controller.presentationContactNotifier,
goToNewGroupChat: () => controller.goToNewGroupChat(context),
isShowContactsNotifier: controller.isShowContactsNotifier,
onContactTap: controller.onContactAction,
onExternalContactTap: controller.onExternalContactAction,
toggleContactsList: controller.toggleContactsList,
textEditingController: controller.textEditingController,
warningBannerNotifier: controller.warningBannerNotifier,
closeContactsWarningBanner: controller.closeContactsWarningBanner,
goToSettingsForPermissionActions:
controller.goToSettingsForPermissionActions,
body: SingleChildScrollView(
keyboardDismissBehavior: PlatformInfos.isMobile
? ScrollViewKeyboardDismissBehavior.manual
: ScrollViewKeyboardDismissBehavior.onDrag,
padding: const EdgeInsets.only(left: 8.0, right: 10.0),
controller: controller.scrollController,
child: ExpansionList(
presentationContactsNotifier:
controller.presentationContactNotifier,
goToNewGroupChat: () => controller.goToNewGroupChat(context),
isShowContactsNotifier: controller.isShowContactsNotifier,
onContactTap: controller.onContactAction,
onExternalContactTap: controller.onExternalContactAction,
toggleContactsList: controller.toggleContactsList,
textEditingController: controller.textEditingController,
warningBannerNotifier: controller.warningBannerNotifier,
closeContactsWarningBanner: controller.closeContactsWarningBanner,
goToSettingsForPermissionActions:
controller.goToSettingsForPermissionActions,
),
),
),
);
Expand Down
2 changes: 2 additions & 0 deletions lib/pages/settings_dashboard/settings/settings_app_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'package:fluffychat/config/app_config.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/linagora_design_flutter.dart';

class SettingsAppBar extends StatelessWidget implements PreferredSizeWidget {
final Widget? title;
Expand All @@ -21,6 +22,7 @@ class SettingsAppBar extends StatelessWidget implements PreferredSizeWidget {
Widget build(BuildContext context) {
final responsiveUtils = getIt.get<ResponsiveUtils>();
return AppBar(
backgroundColor: LinagoraSysColors.material().onPrimary,
title: title,
leading: responsiveUtils.isMobile(context)
? const BackButton()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:fluffychat/config/app_config.dart';
import 'package:fluffychat/pages/settings_dashboard/settings/settings_view_style.dart';
import 'package:flutter/material.dart';
import 'package:linagora_design_flutter/colors/linagora_ref_colors.dart';
import 'package:linagora_design_flutter/linagora_design_flutter.dart';

class SettingsItemBuilder extends StatelessWidget {
final String title;
Expand All @@ -26,8 +26,9 @@ class SettingsItemBuilder extends StatelessWidget {
return Material(
borderRadius: BorderRadius.circular(AppConfig.borderRadius),
clipBehavior: Clip.hardEdge,
color:
isSelected ? Theme.of(context).colorScheme.secondaryContainer : null,
color: isSelected
? Theme.of(context).colorScheme.secondaryContainer
: LinagoraSysColors.material().onPrimary,
child: InkWell(
onTap: onTap,
child: Padding(
Expand Down
6 changes: 4 additions & 2 deletions lib/pages/settings_dashboard/settings/settings_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import 'package:fluffychat/widgets/avatar/avatar.dart';
import 'package:fluffychat/widgets/avatar/avatar_style.dart';
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:linagora_design_flutter/colors/linagora_ref_colors.dart';
import 'package:linagora_design_flutter/linagora_design_flutter.dart';

import 'settings.dart';

Expand All @@ -24,7 +24,9 @@ class SettingsView extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: LinagoraSysColors.material().onPrimary,
appBar: AppBar(
backgroundColor: LinagoraSysColors.material().onPrimary,
toolbarHeight: AppConfig.toolbarHeight(context),
title: Text(
L10n.of(context)!.settings,
Expand All @@ -48,7 +50,7 @@ class SettingsView extends StatelessWidget {
color: controller.optionsSelectNotifier.value ==
SettingEnum.profile
? Theme.of(context).colorScheme.secondaryContainer
: null,
: LinagoraSysColors.material().onPrimary,
child: InkWell(
onTap: () => controller.goToSettingsProfile(),
child: Padding(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import 'package:fluffychat/pages/settings_dashboard/settings_3pid/settings_3pid.
import 'package:flutter/material.dart';

import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:linagora_design_flutter/linagora_design_flutter.dart';
import 'package:matrix/matrix.dart';

import 'package:fluffychat/widgets/layouts/max_width_body.dart';
Expand All @@ -17,6 +18,7 @@ class Settings3PidView extends StatelessWidget {
Widget build(BuildContext context) {
controller.request ??= Matrix.of(context).client.getAccount3PIDs();
return Scaffold(
backgroundColor: LinagoraSysColors.material().onPrimary,
appBar: SettingsAppBar(
title: Text(L10n.of(context)!.passwordRecovery),
actions: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class SettingsAppLanguageView extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: LinagoraSysColors.material().onPrimary,
appBar: SettingsAppBar(
title: Text(
L10n.of(context)!.appLanguage,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:go_router/go_router.dart';
import 'package:linagora_design_flutter/linagora_design_flutter.dart';

import 'settings_chat.dart';

Expand All @@ -20,6 +21,7 @@ class SettingsChatView extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: LinagoraSysColors.material().onPrimary,
appBar: SettingsAppBar(
title: Text(L10n.of(context)!.chat),
context: context,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:linagora_design_flutter/linagora_design_flutter.dart';
import 'package:matrix/matrix.dart';

import 'package:fluffychat/utils/platform_infos.dart';
Expand All @@ -21,6 +22,7 @@ class EmotesSettingsView extends StatelessWidget {
final client = Matrix.of(context).client;
final imageKeys = controller.pack!.images.keys.toList();
return Scaffold(
backgroundColor: LinagoraSysColors.material().onPrimary,
appBar: SettingsAppBar(
title: Text(L10n.of(context)!.emoteSettings),
context: context,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import 'package:fluffychat/widgets/matrix.dart';
import 'package:flutter/material.dart';

import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:linagora_design_flutter/linagora_design_flutter.dart';

import 'package:matrix/matrix.dart';

Expand All @@ -20,6 +21,7 @@ class SettingsIgnoreListView extends StatelessWidget {
Widget build(BuildContext context) {
final client = Matrix.of(context).client;
return Scaffold(
backgroundColor: LinagoraSysColors.material().onPrimary,
appBar: SettingsAppBar(
title: Text(L10n.of(context)!.ignoredUsers),
context: context,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import 'package:flutter/material.dart';

import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:go_router/go_router.dart';
import 'package:linagora_design_flutter/linagora_design_flutter.dart';
import 'package:matrix/matrix.dart';

import 'package:fluffychat/pages/settings_dashboard/settings_multiple_emotes/settings_multiple_emotes.dart';
Expand All @@ -18,6 +19,7 @@ class MultipleEmotesSettingsView extends StatelessWidget {
Widget build(BuildContext context) {
final room = Matrix.of(context).client.getRoomById(controller.roomId!)!;
return Scaffold(
backgroundColor: LinagoraSysColors.material().onPrimary,
appBar: SettingsAppBar(
title: Text(L10n.of(context)!.emotePacks),
context: context,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import 'package:fluffychat/widgets/matrix.dart';
import 'package:flutter/material.dart';

import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:linagora_design_flutter/linagora_design_flutter.dart';

import 'package:matrix/matrix.dart';

Expand All @@ -20,6 +21,7 @@ class SettingsNotificationsView extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: LinagoraSysColors.material().onPrimary,
appBar: SettingsAppBar(
title: Text(L10n.of(context)!.notifications),
context: context,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import 'package:fluffychat/utils/beautify_string_extension.dart';
import 'package:fluffychat/utils/platform_infos.dart';
import 'package:fluffychat/widgets/layouts/max_width_body.dart';
import 'package:fluffychat/widgets/matrix.dart';
import 'package:linagora_design_flutter/linagora_design_flutter.dart';
import 'settings_security.dart';

class SettingsSecurityView extends StatelessWidget {
Expand All @@ -14,6 +15,7 @@ class SettingsSecurityView extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: LinagoraSysColors.material().onPrimary,
appBar: SettingsAppBar(
title: Text(L10n.of(context)!.security),
context: context,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:fluffychat/pages/settings_dashboard/settings_stories/settings_stories.dart';
import 'package:fluffychat/utils/localized_exception_extension.dart';
import 'package:fluffychat/widgets/avatar/avatar.dart';
import 'package:linagora_design_flutter/linagora_design_flutter.dart';

class SettingsStoriesView extends StatelessWidget {
final SettingsStoriesController controller;
Expand All @@ -13,7 +14,9 @@ class SettingsStoriesView extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: LinagoraSysColors.material().onPrimary,
appBar: AppBar(
backgroundColor: LinagoraSysColors.material().onPrimary,
title: Text(L10n.of(context)!.whoCanSeeMyStories),
elevation: 0,
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';

import 'package:fluffychat/widgets/layouts/max_width_body.dart';
import 'package:linagora_design_flutter/linagora_design_flutter.dart';
import 'settings_style.dart';

class SettingsStyleView extends StatelessWidget {
Expand All @@ -17,11 +18,12 @@ class SettingsStyleView extends StatelessWidget {
const colorPickerSize = 32.0;
final wallpaper = Matrix.of(context).wallpaper;
return Scaffold(
backgroundColor: LinagoraSysColors.material().onPrimary,
appBar: AppBar(
backgroundColor: LinagoraSysColors.material().onPrimary,
leading: const BackButton(),
title: Text(L10n.of(context)!.changeTheme),
),
backgroundColor: Theme.of(context).colorScheme.surface,
body: MaxWidthBody(
withScrolling: true,
child: Column(
Expand Down

0 comments on commit ecf7632

Please sign in to comment.