dartlangeditorflutterflutter-appsflutter-examplesflutter-packageflutter-widgetquillquill-deltaquilljsreactquillrich-textrich-text-editorwysiwygwysiwyg-editor
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
849 B
36 lines
849 B
import 'package:flutter/material.dart'; |
|
|
|
import '../../extensions.dart'; |
|
import '../models/documents/nodes/leaf.dart' as leaf; |
|
import '../models/themes/quill_dialog_theme.dart'; |
|
import '../models/themes/quill_icon_theme.dart'; |
|
import 'controller.dart'; |
|
|
|
abstract class EmbedBuilder { |
|
const EmbedBuilder(); |
|
|
|
String get key; |
|
bool get expanded => true; |
|
|
|
WidgetSpan buildWidgetSpan(Widget widget) { |
|
return WidgetSpan(child: widget); |
|
} |
|
|
|
String toPlainText(Embed node) => Embed.kObjectReplacementCharacter; |
|
|
|
Widget build( |
|
BuildContext context, |
|
QuillController controller, |
|
leaf.Embed node, |
|
bool readOnly, |
|
bool inline, |
|
TextStyle textStyle, |
|
); |
|
} |
|
|
|
typedef EmbedButtonBuilder = Widget Function( |
|
QuillController controller, |
|
double toolbarIconSize, |
|
QuillIconTheme? iconTheme, |
|
QuillDialogTheme? dialogTheme, |
|
);
|
|
|