format code

pull/817/head
li3317 3 years ago
parent 5097e86b76
commit 0a9a6c9625
  1. 4
      lib/src/models/themes/quill_custom_icon.dart
  2. 3
      lib/src/widgets/raw_editor/raw_editor_state_selection_delegate_mixin.dart
  3. 21
      lib/src/widgets/toolbar.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;

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

@ -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<QuillCustomIcon> customIcons;
@override
Size get preferredSize => Size.fromHeight(toolbarHeight);

Loading…
Cancel
Save