Browse Source

[flutter]: press enter to exist TextFieldDialog

appflowy 3 years ago
parent
commit
27a3f2b01f

+ 0 - 1
app_flowy/lib/workspace/presentation/stack_page/trash/trash_page.dart

@@ -3,7 +3,6 @@ import 'package:app_flowy/workspace/application/trash/trash_bloc.dart';
 import 'package:app_flowy/workspace/domain/page_stack/page_stack.dart';
 import 'package:app_flowy/workspace/presentation/stack_page/trash/widget/sizes.dart';
 import 'package:app_flowy/workspace/presentation/stack_page/trash/widget/trash_cell.dart';
-import 'package:app_flowy/workspace/presentation/widgets/home_top_bar.dart';
 import 'package:flowy_infra/image.dart';
 import 'package:flowy_infra/theme.dart';
 import 'package:flowy_infra_ui/style_widget/scrolling/styled_list.dart';

+ 4 - 0
app_flowy/lib/workspace/presentation/widgets/dialogs.dart

@@ -60,6 +60,10 @@ class _CreateTextFieldDialog extends State<TextFieldDialog> {
             onChanged: (text) {
               newValue = text;
             },
+            onEditingComplete: () {
+              widget.confirm(newValue);
+              AppGlobals.nav.pop();
+            },
           ),
           const VSpace(10),
           OkCancelButton(

+ 2 - 2
app_flowy/lib/workspace/presentation/widgets/menu/menu.dart

@@ -101,7 +101,7 @@ class HomeMenu extends StatelessWidget {
                   mainAxisAlignment: MainAxisAlignment.start,
                   children: [
                     const MenuTopBar(),
-                    const VSpace(16),
+                    const VSpace(10),
                     _renderApps(context),
                   ],
                 ).padding(horizontal: Insets.l),
@@ -136,7 +136,7 @@ class HomeMenu extends StatelessWidget {
               itemCount: menuItems.length,
               separatorBuilder: (context, index) {
                 if (index == 0) {
-                  return const VSpace(29);
+                  return const VSpace(20);
                 } else {
                   return VSpace(MenuAppSizes.appVPadding);
                 }

+ 1 - 1
app_flowy/lib/workspace/presentation/widgets/menu/widget/app/section/item.dart

@@ -56,7 +56,7 @@ class ViewSectionItem extends StatelessWidget {
     List<Widget> children = [
       SizedBox(width: 16, height: 16, child: state.view.thumbnail()),
       const HSpace(2),
-      Expanded(child: FlowyText.regular(state.view.name, fontSize: 12)),
+      Expanded(child: FlowyText.regular(state.view.name, fontSize: 12, overflow: TextOverflow.clip)),
     ];
 
     if (onHover || state.isEditing) {