@@ -225,33 +225,35 @@ Widget _defaultEmbedBuilder(
225225}
226226
227227class QuillEditor extends StatefulWidget {
228- const QuillEditor (
229- {required this .controller,
230- required this .focusNode,
231- required this .scrollController,
232- required this .scrollable,
233- required this .padding,
234- required this .autoFocus,
235- required this .readOnly,
236- required this .expands,
237- this .showCursor,
238- this .paintCursorAboveText,
239- this .placeholder,
240- this .enableInteractiveSelection = true ,
241- this .scrollBottomInset = 0 ,
242- this .minHeight,
243- this .maxHeight,
244- this .customStyles,
245- this .textCapitalization = TextCapitalization .sentences,
246- this .keyboardAppearance = Brightness .light,
247- this .scrollPhysics,
248- this .onLaunchUrl,
249- this .onTapDown,
250- this .onTapUp,
251- this .onSingleLongTapStart,
252- this .onSingleLongTapMoveUpdate,
253- this .onSingleLongTapEnd,
254- this .embedBuilder = _defaultEmbedBuilder});
228+ const QuillEditor ({
229+ required this .controller,
230+ required this .focusNode,
231+ required this .scrollController,
232+ required this .scrollable,
233+ required this .padding,
234+ required this .autoFocus,
235+ required this .readOnly,
236+ required this .expands,
237+ this .showCursor,
238+ this .paintCursorAboveText,
239+ this .placeholder,
240+ this .enableInteractiveSelection = true ,
241+ this .scrollBottomInset = 0 ,
242+ this .minHeight,
243+ this .maxHeight,
244+ this .customStyles,
245+ this .textCapitalization = TextCapitalization .sentences,
246+ this .keyboardAppearance = Brightness .light,
247+ this .scrollPhysics,
248+ this .onLaunchUrl,
249+ this .onTapDown,
250+ this .onTapUp,
251+ this .onSingleLongTapStart,
252+ this .onSingleLongTapMoveUpdate,
253+ this .onSingleLongTapEnd,
254+ this .embedBuilder = _defaultEmbedBuilder,
255+ this .styleBuilder,
256+ });
255257
256258 factory QuillEditor .basic ({
257259 required QuillController controller,
@@ -310,6 +312,7 @@ class QuillEditor extends StatefulWidget {
310312 onSingleLongTapEnd;
311313
312314 final EmbedBuilder embedBuilder;
315+ final StyleBuilder ? styleBuilder;
313316
314317 @override
315318 _QuillEditorState createState () => _QuillEditorState ();
@@ -374,46 +377,48 @@ class _QuillEditorState extends State<QuillEditor>
374377 return _selectionGestureDetectorBuilder.build (
375378 HitTestBehavior .translucent,
376379 RawEditor (
377- _editorKey,
378- widget.controller,
379- widget.focusNode,
380- widget.scrollController,
381- widget.scrollable,
382- widget.scrollBottomInset,
383- widget.padding,
384- widget.readOnly,
385- widget.placeholder,
386- widget.onLaunchUrl,
387- ToolbarOptions (
388- copy: widget.enableInteractiveSelection,
389- cut: widget.enableInteractiveSelection,
390- paste: widget.enableInteractiveSelection,
391- selectAll: widget.enableInteractiveSelection,
392- ),
393- theme.platform == TargetPlatform .iOS ||
394- theme.platform == TargetPlatform .android,
395- widget.showCursor,
396- CursorStyle (
397- color: cursorColor,
398- backgroundColor: Colors .grey,
399- width: 2 ,
400- radius: cursorRadius,
401- offset: cursorOffset,
402- paintAboveText: widget.paintCursorAboveText ?? paintCursorAboveText,
403- opacityAnimates: cursorOpacityAnimates,
404- ),
405- widget.textCapitalization,
406- widget.maxHeight,
407- widget.minHeight,
408- widget.customStyles,
409- widget.expands,
410- widget.autoFocus,
411- selectionColor,
412- textSelectionControls,
413- widget.keyboardAppearance,
414- widget.enableInteractiveSelection,
415- widget.scrollPhysics,
416- widget.embedBuilder),
380+ _editorKey,
381+ widget.controller,
382+ widget.focusNode,
383+ widget.scrollController,
384+ widget.scrollable,
385+ widget.scrollBottomInset,
386+ widget.padding,
387+ widget.readOnly,
388+ widget.placeholder,
389+ widget.onLaunchUrl,
390+ ToolbarOptions (
391+ copy: widget.enableInteractiveSelection,
392+ cut: widget.enableInteractiveSelection,
393+ paste: widget.enableInteractiveSelection,
394+ selectAll: widget.enableInteractiveSelection,
395+ ),
396+ theme.platform == TargetPlatform .iOS ||
397+ theme.platform == TargetPlatform .android,
398+ widget.showCursor,
399+ CursorStyle (
400+ color: cursorColor,
401+ backgroundColor: Colors .grey,
402+ width: 2 ,
403+ radius: cursorRadius,
404+ offset: cursorOffset,
405+ paintAboveText: widget.paintCursorAboveText ?? paintCursorAboveText,
406+ opacityAnimates: cursorOpacityAnimates,
407+ ),
408+ widget.textCapitalization,
409+ widget.maxHeight,
410+ widget.minHeight,
411+ widget.customStyles,
412+ widget.expands,
413+ widget.autoFocus,
414+ selectionColor,
415+ textSelectionControls,
416+ widget.keyboardAppearance,
417+ widget.enableInteractiveSelection,
418+ widget.scrollPhysics,
419+ widget.embedBuilder,
420+ widget.styleBuilder,
421+ ),
417422 );
418423 }
419424
0 commit comments