@ -149,7 +149,7 @@ class QuillEditor extends StatefulWidget {
final bool ? showCursor ;
final bool ? showCursor ;
final bool readOnly ;
final bool readOnly ;
final String ? placeholder ;
final String ? placeholder ;
final bool ? enableInteractiveSelection ;
final bool enableInteractiveSelection ;
final double ? minHeight ;
final double ? minHeight ;
final double ? maxHeight ;
final double ? maxHeight ;
final DefaultStyles ? customStyles ;
final DefaultStyles ? customStyles ;
@ -161,8 +161,7 @@ class QuillEditor extends StatefulWidget {
final EmbedBuilder embedBuilder ;
final EmbedBuilder embedBuilder ;
QuillEditor (
QuillEditor (
{ Key ? key ,
{ required this . controller ,
required this . controller ,
required this . focusNode ,
required this . focusNode ,
required this . scrollController ,
required this . scrollController ,
required this . scrollable ,
required this . scrollable ,
@ -171,7 +170,7 @@ class QuillEditor extends StatefulWidget {
this . showCursor ,
this . showCursor ,
required this . readOnly ,
required this . readOnly ,
this . placeholder ,
this . placeholder ,
this . enableInteractiveSelection ,
this . enableInteractiveSelection = true ,
this . minHeight ,
this . minHeight ,
this . maxHeight ,
this . maxHeight ,
this . customStyles ,
this . customStyles ,
@ -184,7 +183,7 @@ class QuillEditor extends StatefulWidget {
kIsWeb ? _defaultEmbedBuilderWeb : _defaultEmbedBuilder } ) ;
kIsWeb ? _defaultEmbedBuilderWeb : _defaultEmbedBuilder } ) ;
factory QuillEditor . basic (
factory QuillEditor . basic (
{ Key ? key , required QuillController controller , required bool readOnly } ) {
{ required QuillController controller , required bool readOnly } ) {
return QuillEditor (
return QuillEditor (
controller: controller ,
controller: controller ,
scrollController: ScrollController ( ) ,
scrollController: ScrollController ( ) ,
@ -270,10 +269,10 @@ class _QuillEditorState extends State<QuillEditor>
widget . placeholder ,
widget . placeholder ,
widget . onLaunchUrl ,
widget . onLaunchUrl ,
ToolbarOptions (
ToolbarOptions (
copy: widget . enableInteractiveSelection ? ? true ,
copy: widget . enableInteractiveSelection ,
cut: widget . enableInteractiveSelection ? ? true ,
cut: widget . enableInteractiveSelection ,
paste: widget . enableInteractiveSelection ? ? true ,
paste: widget . enableInteractiveSelection ,
selectAll: widget . enableInteractiveSelection ? ? true ,
selectAll: widget . enableInteractiveSelection ,
) ,
) ,
theme . platform = = TargetPlatform . iOS | |
theme . platform = = TargetPlatform . iOS | |
theme . platform = = TargetPlatform . android ,
theme . platform = = TargetPlatform . android ,
@ -296,7 +295,7 @@ class _QuillEditorState extends State<QuillEditor>
selectionColor ,
selectionColor ,
textSelectionControls ,
textSelectionControls ,
widget . keyboardAppearance ,
widget . keyboardAppearance ,
widget . enableInteractiveSelection ! ,
widget . enableInteractiveSelection ,
widget . scrollPhysics ,
widget . scrollPhysics ,
widget . embedBuilder ) ,
widget . embedBuilder ) ,
) ;
) ;
@ -313,7 +312,7 @@ class _QuillEditorState extends State<QuillEditor>
}
}
@ override
@ override
bool ? getSelectionEnabled ( ) {
bool getSelectionEnabled ( ) {
return widget . enableInteractiveSelection ;
return widget . enableInteractiveSelection ;
}
}
@ -331,7 +330,7 @@ class _QuillEditorSelectionGestureDetectorBuilder
@ override
@ override
onForcePressStart ( ForcePressDetails details ) {
onForcePressStart ( ForcePressDetails details ) {
super . onForcePressStart ( details ) ;
super . onForcePressStart ( details ) ;
if ( delegate . getSelectionEnabled ( ) ! & & shouldShowSelectionToolbar ) {
if ( delegate . getSelectionEnabled ( ) & & shouldShowSelectionToolbar ) {
getEditor ( ) ! . showToolbar ( ) ;
getEditor ( ) ! . showToolbar ( ) ;
}
}
}
}
@ -341,7 +340,7 @@ class _QuillEditorSelectionGestureDetectorBuilder
@ override
@ override
void onSingleLongTapMoveUpdate ( LongPressMoveUpdateDetails details ) {
void onSingleLongTapMoveUpdate ( LongPressMoveUpdateDetails details ) {
if ( ! delegate . getSelectionEnabled ( ) ! ) {
if ( ! delegate . getSelectionEnabled ( ) ) {
return ;
return ;
}
}
switch ( Theme . of ( _state . context ) . platform ) {
switch ( Theme . of ( _state . context ) . platform ) {
@ -470,7 +469,7 @@ class _QuillEditorSelectionGestureDetectorBuilder
bool positionSelected = _onTapping ( details ) ;
bool positionSelected = _onTapping ( details ) ;
if ( delegate . getSelectionEnabled ( ) ! & & ! positionSelected ) {
if ( delegate . getSelectionEnabled ( ) & & ! positionSelected ) {
switch ( Theme . of ( _state . context ) . platform ) {
switch ( Theme . of ( _state . context ) . platform ) {
case TargetPlatform . iOS:
case TargetPlatform . iOS:
case TargetPlatform . macOS:
case TargetPlatform . macOS:
@ -499,7 +498,7 @@ class _QuillEditorSelectionGestureDetectorBuilder
@ override
@ override
void onSingleLongTapStart ( LongPressStartDetails details ) {
void onSingleLongTapStart ( LongPressStartDetails details ) {
if ( delegate . getSelectionEnabled ( ) ! ) {
if ( delegate . getSelectionEnabled ( ) ) {
switch ( Theme . of ( _state . context ) . platform ) {
switch ( Theme . of ( _state . context ) . platform ) {
case TargetPlatform . iOS:
case TargetPlatform . iOS:
case TargetPlatform . macOS:
case TargetPlatform . macOS: