Skip to content

Commit

Permalink
TW-2088 change chevron icon in appbars
Browse files Browse the repository at this point in the history
  • Loading branch information
KhaledNjim authored and hoangdat committed Nov 11, 2024
1 parent aa7bea5 commit 577bed5
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 38 deletions.
4 changes: 3 additions & 1 deletion lib/pages/chat_details/chat_details_view.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import 'package:fluffychat/pages/chat_details/chat_details_view_style.dart';
import 'package:fluffychat/presentation/extensions/room_summary_extension.dart';
import 'package:fluffychat/widgets/app_bars/twake_app_bar.dart';
import 'package:fluffychat/widgets/avatar/avatar.dart';
import 'package:fluffychat/widgets/avatar/avatar_style.dart';
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:linagora_design_flutter/avatar/round_avatar_style.dart';
Expand Down Expand Up @@ -48,7 +50,7 @@ class ChatDetailsView extends StatelessWidget {
highlightColor: Colors.transparent,
onTap: controller.widget.closeRightColumn,
icon: controller.widget.isInStack
? Icons.arrow_back_ios
? Icons.chevron_left_outlined
: Icons.close,
),
centerTitle: true,
Expand Down
12 changes: 6 additions & 6 deletions lib/pages/device_settings/device_settings_view.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:fluffychat/di/global/get_it_initializer.dart';
import 'package:fluffychat/utils/responsive/responsive_utils.dart';
import 'package:fluffychat/widgets/app_bars/twake_app_bar.dart';
import 'package:fluffychat/widgets/twake_components/twake_icon_button.dart';
import 'package:fluffychat/widgets/app_bars/twake_app_bar_style.dart';
import 'package:flutter/material.dart';

import 'package:flutter_gen/gen_l10n/l10n.dart';
Expand Down Expand Up @@ -29,12 +29,12 @@ class DevicesSettingsView extends StatelessWidget {
withDivider: true,
leading: responsive.isMobile(context)
? Padding(
padding: const EdgeInsets.only(left: 12, top: 4),
child: TwakeIconButton(
padding: TwakeAppBarStyle.leadingIconPadding,
child: IconButton(
tooltip: L10n.of(context)!.back,
icon: Icons.arrow_back_ios,
onTap: () => context.pop(),
paddingAll: 8.0,
icon: const Icon(Icons.chevron_left_outlined),
onPressed: () => context.pop(),
iconSize: TwakeAppBarStyle.leadingIconSize,
),
)
: const SizedBox.shrink(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import 'package:fluffychat/utils/extension/string_extension.dart';
import 'package:fluffychat/utils/responsive/responsive_utils.dart';
import 'package:fluffychat/widgets/app_bars/twake_app_bar.dart';
import 'package:fluffychat/widgets/app_bars/twake_app_bar_style.dart';
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:go_router/go_router.dart';
Expand All @@ -31,14 +30,14 @@ class SettingsAppLanguageView extends StatelessWidget {
leading: responsiveUtils.isMobile(context)
? Padding(
padding: TwakeAppBarStyle.leadingIconPadding,
child: TwakeIconButton(
child: IconButton(
tooltip: L10n.of(context)!.back,
icon: Icons.arrow_back_ios,
onTap: () => context.pop(),
paddingAll: 8.0,
icon: const Icon(Icons.chevron_left_outlined),
onPressed: () => context.pop(),
iconSize: TwakeAppBarStyle.leadingIconSize,
),
)
: null,
: const SizedBox.shrink(),
centerTitle: true,
withDivider: true,
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import 'package:fluffychat/widgets/app_bars/twake_app_bar_style.dart';
import 'package:fluffychat/widgets/layouts/max_width_body.dart';
import 'package:fluffychat/widgets/matrix.dart';
import 'package:fluffychat/widgets/settings_switch_list_tile.dart';
import 'package:fluffychat/widgets/twake_components/twake_icon_button.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
Expand All @@ -35,11 +34,11 @@ class SettingsChatView extends StatelessWidget {
leading: responsive.isMobile(context)
? Padding(
padding: TwakeAppBarStyle.leadingIconPadding,
child: TwakeIconButton(
child: IconButton(
tooltip: L10n.of(context)!.back,
icon: Icons.arrow_back_ios,
onTap: () => context.pop(),
paddingAll: 8.0,
icon: const Icon(Icons.chevron_left_outlined),
onPressed: () => context.pop(),
iconSize: TwakeAppBarStyle.leadingIconSize,
),
)
: const SizedBox.shrink(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import 'package:fluffychat/utils/responsive/responsive_utils.dart';
import 'package:fluffychat/widgets/app_bars/twake_app_bar.dart';
import 'package:fluffychat/widgets/app_bars/twake_app_bar_style.dart';
import 'package:fluffychat/widgets/matrix.dart';
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:go_router/go_router.dart';
Expand Down Expand Up @@ -33,11 +32,11 @@ class SettingsNotificationsView extends StatelessWidget {
leading: responsive.isMobile(context)
? Padding(
padding: TwakeAppBarStyle.leadingIconPadding,
child: TwakeIconButton(
child: IconButton(
tooltip: L10n.of(context)!.back,
icon: Icons.arrow_back_ios,
onTap: () => context.pop(),
paddingAll: 8.0,
icon: const Icon(Icons.chevron_left_outlined),
onPressed: () => context.pop(),
iconSize: TwakeAppBarStyle.leadingIconSize,
),
)
: const SizedBox.shrink(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import 'package:fluffychat/pages/settings_dashboard/settings_profile/settings_pr
import 'package:fluffychat/presentation/model/settings/settings_profile_presentation.dart';
import 'package:fluffychat/utils/responsive/responsive_utils.dart';
import 'package:fluffychat/widgets/app_bars/twake_app_bar.dart';
import 'package:fluffychat/widgets/app_bars/twake_app_bar_style.dart';
import 'package:fluffychat/widgets/twake_components/twake_icon_button.dart';
import 'package:flutter/material.dart';
import 'package:flutter_adaptive_scaffold/flutter_adaptive_scaffold.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import 'package:fluffychat/di/global/get_it_initializer.dart';
import 'package:fluffychat/utils/responsive/responsive_utils.dart';
import 'package:fluffychat/widgets/app_bars/twake_app_bar.dart';
import 'package:fluffychat/widgets/app_bars/twake_app_bar_style.dart';
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:fluffychat/utils/beautify_string_extension.dart';
Expand Down Expand Up @@ -31,11 +30,11 @@ class SettingsSecurityView extends StatelessWidget {
leading: responsive.isMobile(context)
? Padding(
padding: TwakeAppBarStyle.leadingIconPadding,
child: TwakeIconButton(
child: IconButton(
tooltip: L10n.of(context)!.back,
icon: Icons.arrow_back_ios,
onTap: () => context.pop(),
paddingAll: 8.0,
icon: const Icon(Icons.chevron_left_outlined),
onPressed: () => context.pop(),
iconSize: TwakeAppBarStyle.leadingIconSize,
),
)
: const SizedBox.shrink(),
Expand Down
8 changes: 3 additions & 5 deletions lib/widgets/app_bars/twake_app_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,10 @@ class TwakeAppBar extends StatelessWidget implements PreferredSizeWidget {
leading: leading,
title: Column(
children: [
if (withDivider)
const SizedBox(
height: 12,
),
Padding(
padding: ContactsAppbarStyle.titlePadding(context),
padding: centerTitle == true
? EdgeInsets.zero
: ContactsAppbarStyle.titlePadding(context),
child: Text(
title,
style: TwakeAppBarStyle.titleTextStyle(context),
Expand Down
6 changes: 3 additions & 3 deletions lib/widgets/app_bars/twake_app_bar_style.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ class TwakeAppBarStyle {

static double toolBarHeight(BuildContext context) =>
responsiveUtils.isMobile(context) ? 48.0 : 56.0;
static EdgeInsets dividerPadding = const EdgeInsets.only(top: 12);
static EdgeInsets dividerPadding = const EdgeInsets.only(top: 0);
static const double dividerHeight = 1.0;
static const double dividerthickness = 1.0;
static const EdgeInsets leadingIconPadding =
EdgeInsets.only(left: 12, top: 4);
static const EdgeInsets leadingIconPadding = EdgeInsets.only(left: 12);
static const double leadingIconSize = 24;
}

0 comments on commit 577bed5

Please sign in to comment.