diff --git a/frontend/appflowy_flutter/lib/mobile/presentation/home/setting/settings_popup_menu.dart b/frontend/appflowy_flutter/lib/mobile/presentation/home/setting/settings_popup_menu.dart index ae7842d08f..643c7bc332 100644 --- a/frontend/appflowy_flutter/lib/mobile/presentation/home/setting/settings_popup_menu.dart +++ b/frontend/appflowy_flutter/lib/mobile/presentation/home/setting/settings_popup_menu.dart @@ -28,9 +28,9 @@ class HomePageSettingsPopupMenu extends StatelessWidget { Radius.circular(12.0), ), ), - // todo: replace it with shadows shadowColor: const Color(0x68000000), elevation: 10, + color: Theme.of(context).colorScheme.surface, child: const Padding( padding: EdgeInsets.all(8.0), child: FlowySvg( diff --git a/frontend/appflowy_flutter/lib/mobile/presentation/setting/workspace/invite_members_screen.dart b/frontend/appflowy_flutter/lib/mobile/presentation/setting/workspace/invite_members_screen.dart index b9658d670c..2e394c95e0 100644 --- a/frontend/appflowy_flutter/lib/mobile/presentation/setting/workspace/invite_members_screen.dart +++ b/frontend/appflowy_flutter/lib/mobile/presentation/setting/workspace/invite_members_screen.dart @@ -34,6 +34,7 @@ class InviteMembersScreen extends StatelessWidget { titleText: LocaleKeys.settings_appearance_members_label.tr(), ), body: const _InviteMemberPage(), + resizeToAvoidBottomInset: false, ); } } @@ -193,6 +194,9 @@ class _InviteMemberPageState extends State<_InviteMemberPage> { final actionType = actionResult.actionType; final result = actionResult.result; + // get keyboard height + final keyboardHeight = MediaQuery.of(context).viewInsets.bottom; + // only show the result dialog when the action is WorkspaceMemberActionType.add if (actionType == WorkspaceMemberActionType.add) { result.fold( @@ -201,6 +205,7 @@ class _InviteMemberPageState extends State<_InviteMemberPage> { context, message: LocaleKeys.settings_appearance_members_addMemberSuccess.tr(), + bottomPadding: keyboardHeight, ); }, (f) { @@ -216,6 +221,7 @@ class _InviteMemberPageState extends State<_InviteMemberPage> { showToastNotification( context, type: ToastificationType.error, + bottomPadding: keyboardHeight, message: message, ); }, @@ -227,6 +233,7 @@ class _InviteMemberPageState extends State<_InviteMemberPage> { context, message: LocaleKeys.settings_appearance_members_inviteMemberSuccess.tr(), + bottomPadding: keyboardHeight, ); }, (f) { @@ -244,6 +251,7 @@ class _InviteMemberPageState extends State<_InviteMemberPage> { context, type: ToastificationType.error, message: message, + bottomPadding: keyboardHeight, ); }, ); @@ -255,6 +263,7 @@ class _InviteMemberPageState extends State<_InviteMemberPage> { message: LocaleKeys .settings_appearance_members_removeFromWorkspaceSuccess .tr(), + bottomPadding: keyboardHeight, ); }, (f) { @@ -264,6 +273,7 @@ class _InviteMemberPageState extends State<_InviteMemberPage> { message: LocaleKeys .settings_appearance_members_removeFromWorkspaceFailed .tr(), + bottomPadding: keyboardHeight, ); }, ); diff --git a/frontend/appflowy_flutter/lib/workspace/presentation/widgets/dialogs.dart b/frontend/appflowy_flutter/lib/workspace/presentation/widgets/dialogs.dart index 80beca1200..aa22d39170 100644 --- a/frontend/appflowy_flutter/lib/workspace/presentation/widgets/dialogs.dart +++ b/frontend/appflowy_flutter/lib/workspace/presentation/widgets/dialogs.dart @@ -303,6 +303,7 @@ void showToastNotification( required String message, String? description, ToastificationType type = ToastificationType.success, + double bottomPadding = 100, }) { if (PlatformExtension.isMobile) { toastification.showCustom( @@ -311,6 +312,7 @@ void showToastNotification( builder: (_, __) => _MToast( message: message, type: type, + bottomPadding: bottomPadding, ), ); return; @@ -346,10 +348,12 @@ class _MToast extends StatelessWidget { const _MToast({ required this.message, this.type = ToastificationType.success, + this.bottomPadding = 100, }); final String message; final ToastificationType type; + final double bottomPadding; @override Widget build(BuildContext context) { @@ -362,7 +366,7 @@ class _MToast extends StatelessWidget { ); return Container( alignment: Alignment.bottomCenter, - padding: const EdgeInsets.only(bottom: 100, left: 16, right: 16), + padding: EdgeInsets.only(bottom: bottomPadding, left: 16, right: 16), child: Container( padding: const EdgeInsets.symmetric(horizontal: 12.0, vertical: 13.0), decoration: BoxDecoration(