[flutter]: press enter to exist TextFieldDialog

This commit is contained in:
appflowy 2021-11-11 23:11:15 +08:00
parent f908cc2cab
commit 27a3f2b01f
4 changed files with 7 additions and 4 deletions

View File

@ -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';

View File

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

View File

@ -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);
}

View File

@ -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) {