Use `ShortcutActivator` instead of `LogicalKeySet`

pull/1185/head
bambinoua 2 years ago
parent fdc155410f
commit 250d1bda48
  1. 18
      lib/src/widgets/editor.dart

@ -143,8 +143,8 @@ abstract class RenderAbstractEditor implements TextLayoutMetrics {
}
class QuillEditor extends StatefulWidget {
const QuillEditor(
{required this.controller,
const QuillEditor({
required this.controller,
required this.focusNode,
required this.scrollController,
required this.scrollable,
@ -184,8 +184,8 @@ class QuillEditor extends StatefulWidget {
this.detectWordBoundary = true,
this.enableUnfocusOnTapOutside = true,
this.customLinkPrefixes = const <String>[],
Key? key})
: super(key: key);
Key? key,
}) : super(key: key);
factory QuillEditor.basic({
required QuillController controller,
@ -302,6 +302,7 @@ class QuillEditor extends StatefulWidget {
/// horizontally centered. This is mostly useful on devices with wide screens.
final double? maxContentWidth;
/// Allows to override [DefaultStyles].
final DefaultStyles? customStyles;
/// Whether this editor's height will be sized to fill its parent.
@ -401,7 +402,14 @@ class QuillEditor extends StatefulWidget {
/// Returns the url of the image if the image should be inserted.
final Future<String?> Function(Uint8List imageBytes)? onImagePaste;
final Map<LogicalKeySet, Intent>? customShortcuts;
/// Contains user-defined shortcuts map.
///
/// [https://docs.flutter.dev/development/ui/advanced/actions-and-shortcuts#shortcuts]
final Map<ShortcutActivator, Intent>? customShortcuts;
/// Contains user-defined actions.
///
/// [https://docs.flutter.dev/development/ui/advanced/actions-and-shortcuts#actions]
final Map<Type, Action<Intent>>? customActions;
final bool detectWordBoundary;

Loading…
Cancel
Save