diff --git a/lib/pages/chat_draft/draft_chat_view.dart b/lib/pages/chat_draft/draft_chat_view.dart index 30edfef862..036134d61c 100644 --- a/lib/pages/chat_draft/draft_chat_view.dart +++ b/lib/pages/chat_draft/draft_chat_view.dart @@ -46,7 +46,7 @@ class DraftChatView extends StatelessWidget { }, child: Scaffold( appBar: AppBar( - toolbarHeight: DraftChatViewStyle.toolbarHeight, + toolbarHeight: DraftChatViewStyle.toolbarHeight(context), surfaceTintColor: Colors.transparent, automaticallyImplyLeading: false, title: Row( diff --git a/lib/pages/chat_draft/draft_chat_view_style.dart b/lib/pages/chat_draft/draft_chat_view_style.dart index 8c52a436b3..666b78b02f 100644 --- a/lib/pages/chat_draft/draft_chat_view_style.dart +++ b/lib/pages/chat_draft/draft_chat_view_style.dart @@ -1,9 +1,14 @@ 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:flutter_gen/gen_l10n/l10n.dart'; class DraftChatViewStyle { - static const double toolbarHeight = 56; + static ResponsiveUtils responsive = getIt.get(); + + static double toolbarHeight(BuildContext context) => + responsive.isMobile(context) ? 56 : 80; static BoxConstraints get containerMaxWidthConstraints => const BoxConstraints(maxWidth: FluffyThemes.columnWidth * 2.5);