From 0a9a6c9625284597ab3c6ab99cfc4443f08a5a03 Mon Sep 17 00:00:00 2001 From: li3317 Date: Fri, 13 May 2022 18:10:29 -0700 Subject: [PATCH] format code --- lib/src/models/themes/quill_custom_icon.dart | 4 +--- ...editor_state_selection_delegate_mixin.dart | 3 +-- lib/src/widgets/toolbar.dart | 21 +++++++++---------- 3 files changed, 12 insertions(+), 16 deletions(-) diff --git a/lib/src/models/themes/quill_custom_icon.dart b/lib/src/models/themes/quill_custom_icon.dart index 62b31ffc..9ad75901 100644 --- a/lib/src/models/themes/quill_custom_icon.dart +++ b/lib/src/models/themes/quill_custom_icon.dart @@ -1,9 +1,7 @@ import 'package:flutter/material.dart'; class QuillCustomIcon { - const QuillCustomIcon( - {this.icon, - this.onTap}); + const QuillCustomIcon({this.icon, this.onTap}); ///The icon widget final IconData? icon; diff --git a/lib/src/widgets/raw_editor/raw_editor_state_selection_delegate_mixin.dart b/lib/src/widgets/raw_editor/raw_editor_state_selection_delegate_mixin.dart index 7363809a..a8697381 100644 --- a/lib/src/widgets/raw_editor/raw_editor_state_selection_delegate_mixin.dart +++ b/lib/src/widgets/raw_editor/raw_editor_state_selection_delegate_mixin.dart @@ -81,8 +81,7 @@ mixin RawEditorStateSelectionDelegateMixin on EditorState scrollController.jumpTo(targetOffset.offset); } renderEditor.showOnScreen(rect: targetOffset.rect); - } catch (_) { - } + } catch (_) {} } // Finds the closest scroll offset to the current scroll offset that fully diff --git a/lib/src/widgets/toolbar.dart b/lib/src/widgets/toolbar.dart index a2e0aada..70883572 100644 --- a/lib/src/widgets/toolbar.dart +++ b/lib/src/widgets/toolbar.dart @@ -176,7 +176,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { toolbarSectionSpacing: toolbarSectionSpacing, toolbarIconAlignment: toolbarIconAlignment, multiRowsDisplay: multiRowsDisplay, - customIcons: customIcons, + customIcons: customIcons, locale: locale, children: [ if (showUndo) @@ -475,15 +475,14 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { endIndent: 12, color: Colors.grey.shade400, ), - for (var customIcon in customIcons) - QuillIconButton( - highlightElevation: 0, - hoverElevation: 0, - size: toolbarIconSize * kIconButtonFactor, - icon: Icon(customIcon.icon, size: toolbarIconSize), - borderRadius:iconTheme?.borderRadius ?? 2, - onPressed: customIcon.onTap - ), + for (var customIcon in customIcons) + QuillIconButton( + highlightElevation: 0, + hoverElevation: 0, + size: toolbarIconSize * kIconButtonFactor, + icon: Icon(customIcon.icon, size: toolbarIconSize), + borderRadius: iconTheme?.borderRadius ?? 2, + onPressed: customIcon.onTap), ], ); } @@ -508,7 +507,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { /// List of custom icons final List customIcons; - + @override Size get preferredSize => Size.fromHeight(toolbarHeight);