mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
[flutter]: press enter to exist TextFieldDialog
This commit is contained in:
@ -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/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/sizes.dart';
|
||||||
import 'package:app_flowy/workspace/presentation/stack_page/trash/widget/trash_cell.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/image.dart';
|
||||||
import 'package:flowy_infra/theme.dart';
|
import 'package:flowy_infra/theme.dart';
|
||||||
import 'package:flowy_infra_ui/style_widget/scrolling/styled_list.dart';
|
import 'package:flowy_infra_ui/style_widget/scrolling/styled_list.dart';
|
||||||
|
@ -60,6 +60,10 @@ class _CreateTextFieldDialog extends State<TextFieldDialog> {
|
|||||||
onChanged: (text) {
|
onChanged: (text) {
|
||||||
newValue = text;
|
newValue = text;
|
||||||
},
|
},
|
||||||
|
onEditingComplete: () {
|
||||||
|
widget.confirm(newValue);
|
||||||
|
AppGlobals.nav.pop();
|
||||||
|
},
|
||||||
),
|
),
|
||||||
const VSpace(10),
|
const VSpace(10),
|
||||||
OkCancelButton(
|
OkCancelButton(
|
||||||
|
@ -101,7 +101,7 @@ class HomeMenu extends StatelessWidget {
|
|||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
const MenuTopBar(),
|
const MenuTopBar(),
|
||||||
const VSpace(16),
|
const VSpace(10),
|
||||||
_renderApps(context),
|
_renderApps(context),
|
||||||
],
|
],
|
||||||
).padding(horizontal: Insets.l),
|
).padding(horizontal: Insets.l),
|
||||||
@ -136,7 +136,7 @@ class HomeMenu extends StatelessWidget {
|
|||||||
itemCount: menuItems.length,
|
itemCount: menuItems.length,
|
||||||
separatorBuilder: (context, index) {
|
separatorBuilder: (context, index) {
|
||||||
if (index == 0) {
|
if (index == 0) {
|
||||||
return const VSpace(29);
|
return const VSpace(20);
|
||||||
} else {
|
} else {
|
||||||
return VSpace(MenuAppSizes.appVPadding);
|
return VSpace(MenuAppSizes.appVPadding);
|
||||||
}
|
}
|
||||||
|
@ -56,7 +56,7 @@ class ViewSectionItem extends StatelessWidget {
|
|||||||
List<Widget> children = [
|
List<Widget> children = [
|
||||||
SizedBox(width: 16, height: 16, child: state.view.thumbnail()),
|
SizedBox(width: 16, height: 16, child: state.view.thumbnail()),
|
||||||
const HSpace(2),
|
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) {
|
if (onHover || state.isEditing) {
|
||||||
|
Reference in New Issue
Block a user