Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.
Dart blogconfluence-alternativecontent-managementcontent-servicesdocumentationflutternote-takingnotion-alternativeproject-managementtask-managementteam-collaborationwiki
[flutter]: config initial scrren size
appflowy1a10f58e6ff1
diff --git a/app_flowy/lib/startup/tasks/application_task.dart b/app_flowy/lib/startup/tasks/application_task.dartindex 035ca92cc1..a6be8c3a7c 100644--- a/app_flowy/lib/startup/tasks/application_task.dart+++ b/app_flowy/lib/startup/tasks/application_task.dart@@ -29,7 +29,9 @@ class ApplicationWidget extends StatelessWidget {@overrideWidget build(BuildContext context) {- setWindowMinSize(const Size(500, 500));+ const ratio = 1.73;+ setWindowMinSize(const Size(500, 500 / ratio));+ setWindowFrame(const Rect.fromLTRB(0, 0, 1310, 1310 / ratio));final theme = AppTheme.fromType(ThemeType.light);return Provider.value(diff --git a/app_flowy/lib/workspace/presentation/home/home_layout.dart b/app_flowy/lib/workspace/presentation/home/home_layout.dartindex 45a6806255..f0192a846b 100644--- a/app_flowy/lib/workspace/presentation/home/home_layout.dart+++ b/app_flowy/lib/workspace/presentation/home/home_layout.dart@@ -17,8 +17,7 @@ class HomeLayout {late double homePageROffset;late Duration animDuration;- HomeLayout(BuildContext context, BoxConstraints homeScreenConstraint,- bool forceCollapse) {+ HomeLayout(BuildContext context, BoxConstraints homeScreenConstraint, bool forceCollapse) {final homeBlocState = context.read<HomeBloc>().state;showEditPannel = homeBlocState.editContext.isSome();diff --git a/app_flowy/lib/workspace/presentation/home/navigation.dart b/app_flowy/lib/workspace/presentation/home/navigation.dartindex 8980371118..61f2bc975b 100644--- a/app_flowy/lib/workspace/presentation/home/navigation.dart+++ b/app_flowy/lib/workspace/presentation/home/navigation.dart@@ -86,6 +86,26 @@ class FlowyNavigation extends StatelessWidget {}}+class IconNaviItemWidget extends StatelessWidget {+ final NavigationItem item;+ const IconNaviItemWidget(this.item, {Key? key}) : super(key: key);++ @override+ Widget build(BuildContext context) {+ return SizedBox(+ height: 24,+ child: FlowyTextButton(+ item.title,+ padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 2),+ fontSize: 12,+ onPressed: () {+ debugPrint('show app document');+ },+ ),+ );+ }+}+class NaviItemWidget extends StatelessWidget {final NavigationItem item;const NaviItemWidget(this.item, {Key? key}) : super(key: key);diff --git a/app_flowy/packages/flowy_infra/lib/size.dart b/app_flowy/packages/flowy_infra/lib/size.dartindex 0e688f9517..65bfc4842c 100644--- a/app_flowy/packages/flowy_infra/lib/size.dart+++ b/app_flowy/packages/flowy_infra/lib/size.dart@@ -52,9 +52,7 @@ class Sizes {static double get iconMed => 20;- static double get sideBarSm => 200 * hitScale;-- static double get sideBarMed => 240 * hitScale;+ static double get sideBarMed => 225 * hitScale;static double get sideBarLg => 290 * hitScale;}