diff --git a/frontend/appflowy_flutter/android/app/build.gradle b/frontend/appflowy_flutter/android/app/build.gradle index d14c7016c1..a9df7ef279 100644 --- a/frontend/appflowy_flutter/android/app/build.gradle +++ b/frontend/appflowy_flutter/android/app/build.gradle @@ -52,7 +52,7 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "io.appflowy.appflowy" - minSdkVersion 23 + minSdkVersion 24 targetSdkVersion 33 versionCode flutterVersionCode.toInteger() versionName flutterVersionName diff --git a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_page.dart b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_page.dart index 2199d0bb3b..05e5db2268 100644 --- a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_page.dart +++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_page.dart @@ -1,8 +1,5 @@ import 'dart:ui' as ui; -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; - import 'package:appflowy/generated/locale_keys.g.dart'; import 'package:appflowy/plugins/document/application/document_bloc.dart'; import 'package:appflowy/plugins/document/presentation/editor_configuration.dart'; @@ -31,6 +28,8 @@ import 'package:collection/collection.dart'; import 'package:easy_localization/easy_localization.dart'; import 'package:flowy_infra/theme_extension.dart'; import 'package:flowy_infra_ui/flowy_infra_ui.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; final codeBlockLocalization = CodeBlockLocalizations( diff --git a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/mobile_toolbar_v3/appflowy_mobile_toolbar.dart b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/mobile_toolbar_v3/appflowy_mobile_toolbar.dart index f3339de3a8..c9e09a04f0 100644 --- a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/mobile_toolbar_v3/appflowy_mobile_toolbar.dart +++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/mobile_toolbar_v3/appflowy_mobile_toolbar.dart @@ -383,9 +383,13 @@ class _MobileToolbarState extends State<_MobileToolbar> return ValueListenableBuilder( valueListenable: cachedKeyboardHeight, builder: (_, height, ___) { + var paddingHeight = height; + if (Platform.isAndroid) { + paddingHeight += MediaQuery.of(context).viewPadding.bottom; + } return AnimatedContainer( duration: const Duration(microseconds: 110), - height: height, + height: paddingHeight, child: ValueListenableBuilder( valueListenable: showMenuNotifier, builder: (_, showingMenu, __) { diff --git a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_style.dart b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_style.dart index bc48ddf8a2..0015716d93 100644 --- a/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_style.dart +++ b/frontend/appflowy_flutter/lib/plugins/document/presentation/editor_style.dart @@ -58,9 +58,8 @@ class EditorStyleCustomizer { DefaultAppearanceSettings.getDefaultSelectionColor(context), defaultTextDirection: appearance.defaultTextDirection, textStyleConfiguration: TextStyleConfiguration( - lineHeight: 1.2, - applyHeightToFirstAscent: true, - applyHeightToLastDescent: true, + // applyHeightToFirstAscent: true, + // applyHeightToLastDescent: true, text: baseTextStyle(fontFamily).copyWith( fontSize: fontSize, color: afThemeExtension.onBackground, @@ -106,6 +105,7 @@ class EditorStyleCustomizer { final textScaleFactor = context.read().state.textScaleFactor; final baseTextStyle = this.baseTextStyle(fontFamily); + return EditorStyle.mobile( padding: padding, defaultTextDirection: defaultTextDirection, diff --git a/frontend/appflowy_flutter/lib/startup/tasks/app_widget.dart b/frontend/appflowy_flutter/lib/startup/tasks/app_widget.dart index 25b5b419b5..19bab6ec4b 100644 --- a/frontend/appflowy_flutter/lib/startup/tasks/app_widget.dart +++ b/frontend/appflowy_flutter/lib/startup/tasks/app_widget.dart @@ -1,8 +1,5 @@ import 'dart:io'; -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; - import 'package:appflowy/mobile/application/mobile_router.dart'; import 'package:appflowy/plugins/document/application/document_appearance_cubit.dart'; import 'package:appflowy/shared/feature_flags.dart'; @@ -25,6 +22,8 @@ import 'package:appflowy_editor/appflowy_editor.dart' hide Log; import 'package:easy_localization/easy_localization.dart'; import 'package:flowy_infra/theme.dart'; import 'package:flowy_infra_ui/flowy_infra_ui.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:go_router/go_router.dart'; @@ -234,23 +233,12 @@ class _ApplicationWidgetState extends State { void _setSystemOverlayStyle(AppearanceSettingsState state) { if (Platform.isAndroid) { - SystemUiOverlayStyle style = SystemUiOverlayStyle.dark; - final themeMode = state.themeMode; - if (themeMode == ThemeMode.dark) { - style = SystemUiOverlayStyle.light; - } else if (themeMode == ThemeMode.light) { - style = SystemUiOverlayStyle.dark; - } else { - final brightness = Theme.of(context).brightness; - // reverse the brightness of the system status bar. - style = brightness == Brightness.dark - ? SystemUiOverlayStyle.light - : SystemUiOverlayStyle.dark; - } - + SystemChrome.setEnabledSystemUIMode( + SystemUiMode.edgeToEdge, + overlays: [], + ); SystemChrome.setSystemUIOverlayStyle( - style.copyWith( - statusBarColor: Colors.transparent, + const SystemUiOverlayStyle( systemNavigationBarColor: Colors.transparent, ), ); diff --git a/frontend/appflowy_flutter/pubspec.lock b/frontend/appflowy_flutter/pubspec.lock index cb14d7a654..ffdf26e42a 100644 --- a/frontend/appflowy_flutter/pubspec.lock +++ b/frontend/appflowy_flutter/pubspec.lock @@ -53,8 +53,8 @@ packages: dependency: "direct main" description: path: "." - ref: "0c79b870586f4bc5c23b61b327c51fe6a8856b47" - resolved-ref: "0c79b870586f4bc5c23b61b327c51fe6a8856b47" + ref: d73e8893d1f1b06566ebed5868698be75c6b7f93 + resolved-ref: d73e8893d1f1b06566ebed5868698be75c6b7f93 url: "https://github.com/AppFlowy-IO/appflowy-editor.git" source: git version: "2.5.1" diff --git a/frontend/appflowy_flutter/pubspec.yaml b/frontend/appflowy_flutter/pubspec.yaml index 29750bedb1..bbefbe3c05 100644 --- a/frontend/appflowy_flutter/pubspec.yaml +++ b/frontend/appflowy_flutter/pubspec.yaml @@ -185,7 +185,7 @@ dependency_overrides: appflowy_editor: git: url: https://github.com/AppFlowy-IO/appflowy-editor.git - ref: "0c79b870586f4bc5c23b61b327c51fe6a8856b47" + ref: "d73e8893d1f1b06566ebed5868698be75c6b7f93" sheet: git: