@@ -15,6 +15,7 @@ import 'buttons/font_size.dart';
15
15
import 'buttons/history.dart' ;
16
16
import 'buttons/indent.dart' ;
17
17
import 'buttons/link_style.dart' ;
18
+ import 'buttons/link_style2.dart' ;
18
19
import 'buttons/search.dart' ;
19
20
import 'buttons/select_alignment.dart' ;
20
21
import 'buttons/select_header_style.dart' ;
@@ -32,6 +33,7 @@ export './buttons/font_size.dart';
32
33
export './buttons/history.dart' ;
33
34
export './buttons/indent.dart' ;
34
35
export './buttons/link_style.dart' ;
36
+ export './buttons/link_style2.dart' ;
35
37
export './buttons/search.dart' ;
36
38
export './buttons/select_alignment.dart' ;
37
39
export './buttons/select_header_style.dart' ;
@@ -50,6 +52,17 @@ const double kIconButtonFactor = 1.77;
50
52
/// The horizontal margin between the contents of each toolbar section.
51
53
const double kToolbarSectionSpacing = 4 ;
52
54
55
+ enum LinkStyleType {
56
+ /// Defines the original [QuillToolbarLinkStyleButton] .
57
+ original,
58
+
59
+ /// Defines the alternative [QuillToolbarLinkStyleButton2] .
60
+ alternative;
61
+
62
+ bool get isOriginal => this == LinkStyleType .original;
63
+ bool get isAlternative => this == LinkStyleType .alternative;
64
+ }
65
+
53
66
/// The configurations for the toolbar widget of flutter quill
54
67
@immutable
55
68
class QuillToolbarConfigurations extends QuillSharedToolbarProperties {
@@ -91,6 +104,7 @@ class QuillToolbarConfigurations extends QuillSharedToolbarProperties {
91
104
this .showSearchButton = true ,
92
105
this .showSubscript = true ,
93
106
this .showSuperscript = true ,
107
+ this .linkStyleType = LinkStyleType .original,
94
108
super .customButtons = const [],
95
109
96
110
/// The decoration to use for the toolbar.
@@ -191,6 +205,9 @@ class QuillToolbarConfigurations extends QuillSharedToolbarProperties {
191
205
///shown when embedding an image, for example
192
206
final QuillDialogTheme ? dialogTheme;
193
207
208
+ /// Defines which dialog is used for applying link attribute.
209
+ final LinkStyleType linkStyleType;
210
+
194
211
@override
195
212
List <Object ?> get props => [
196
213
buttonOptions,
@@ -239,6 +256,7 @@ class QuillToolbarButtonOptions extends Equatable {
239
256
this .selectHeaderStyleButtons =
240
257
const QuillToolbarSelectHeaderStyleButtonsOptions (),
241
258
this .linkStyle = const QuillToolbarLinkStyleButtonOptions (),
259
+ this .linkStyle2 = const QuillToolbarLinkStyleButton2Options (),
242
260
this .customButtons = const QuillToolbarCustomButtonOptions (),
243
261
});
244
262
@@ -284,6 +302,7 @@ class QuillToolbarButtonOptions extends Equatable {
284
302
final QuillToolbarSelectHeaderStyleButtonsOptions selectHeaderStyleButtons;
285
303
286
304
final QuillToolbarLinkStyleButtonOptions linkStyle;
305
+ final QuillToolbarLinkStyleButton2Options linkStyle2;
287
306
288
307
final QuillToolbarCustomButtonOptions customButtons;
289
308
0 commit comments