-
Notifications
You must be signed in to change notification settings - Fork 849
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
32 changed files
with
791 additions
and
406 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import 'package:flutter/widgets.dart' show Color; | ||
|
||
import '../../../../widgets/toolbar/toolbar.dart'; | ||
import '../../../structs/link_dialog_action.dart'; | ||
import '../../../themes/quill_dialog_theme.dart'; | ||
|
||
class QuillToolbarLinkStyleButtonExtraOptions | ||
extends QuillToolbarBaseButtonExtraOptions { | ||
const QuillToolbarLinkStyleButtonExtraOptions({ | ||
required super.controller, | ||
required super.context, | ||
required super.onPressed, | ||
}); | ||
} | ||
|
||
class QuillToolbarLinkStyleButtonOptions extends QuillToolbarBaseButtonOptions< | ||
QuillToolbarLinkStyleButtonOptions, | ||
QuillToolbarLinkStyleButtonExtraOptions> { | ||
const QuillToolbarLinkStyleButtonOptions({ | ||
this.dialogTheme, | ||
this.linkRegExp, | ||
this.linkDialogAction, | ||
this.dialogBarrierColor, | ||
this.iconSize, | ||
super.iconData, | ||
super.globalIconSize, | ||
super.afterButtonPressed, | ||
super.tooltip, | ||
super.iconTheme, | ||
super.childBuilder, | ||
super.controller, | ||
}); | ||
|
||
final double? iconSize; | ||
final QuillDialogTheme? dialogTheme; | ||
final RegExp? linkRegExp; | ||
final LinkDialogAction? linkDialogAction; | ||
final Color? dialogBarrierColor; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import 'package:flutter/widgets.dart' show Color; | ||
|
||
import '../../../../../flutter_quill.dart'; | ||
|
||
class QuillToolbarSearchButtonExtraOptions | ||
extends QuillToolbarBaseButtonExtraOptions { | ||
const QuillToolbarSearchButtonExtraOptions({ | ||
required super.controller, | ||
required super.context, | ||
required super.onPressed, | ||
}); | ||
} | ||
|
||
class QuillToolbarSearchButtonOptions extends QuillToolbarBaseButtonOptions { | ||
const QuillToolbarSearchButtonOptions({ | ||
super.iconData, | ||
super.controller, | ||
super.childBuilder, | ||
super.tooltip, | ||
super.afterButtonPressed, | ||
super.iconTheme, | ||
this.dialogTheme, | ||
this.iconSize, | ||
this.dialogBarrierColor, | ||
this.fillColor, | ||
this.customOnPressedCallback, | ||
}); | ||
|
||
final QuillDialogTheme? dialogTheme; | ||
final double? iconSize; | ||
|
||
/// By default will be [dialogBarrierColor] from [QuillSharedConfigurations] | ||
final Color? dialogBarrierColor; | ||
|
||
final Color? fillColor; | ||
|
||
/// By default we will show simple search dialog ui | ||
/// you can pass value to this callback to change this | ||
final QuillToolbarSearchButtomOnPressedCallback? customOnPressedCallback; | ||
} | ||
|
||
typedef QuillToolbarSearchButtomOnPressedCallback = Future<void> Function( | ||
QuillController controller, | ||
); | ||
|
||
// typedef QuillToolbarSearchButtonFindTextCallback = List<int> Function({ | ||
// required int index, | ||
// required String text, | ||
// required QuillController controller, | ||
// required List<int> offsets, | ||
// required bool wholeWord, | ||
// required bool caseSensitive, | ||
// bool moveToPosition, | ||
// }); | ||
|
||
// typedef QuillToolbarSearchButtonMoveToPositionCallback = void Function({ | ||
// required int index, | ||
// required String text, | ||
// required QuillController controller, | ||
// required List<int> offsets, | ||
// }); |
41 changes: 41 additions & 0 deletions
41
lib/src/models/config/toolbar/buttons/select_header_style.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import 'package:flutter/widgets.dart' show Axis; | ||
|
||
import '../../../../widgets/toolbar/toolbar.dart'; | ||
import '../../../documents/attribute.dart'; | ||
|
||
class QuillToolbarSelectHeaderStyleButtonExtraOptions | ||
extends QuillToolbarBaseButtonExtraOptions { | ||
const QuillToolbarSelectHeaderStyleButtonExtraOptions({ | ||
required super.controller, | ||
required super.context, | ||
required super.onPressed, | ||
}); | ||
} | ||
|
||
class QuillToolbarSelectHeaderStyleButtonsOptions | ||
extends QuillToolbarBaseButtonOptions< | ||
QuillToolbarSelectHeaderStyleButtonsOptions, | ||
QuillToolbarSelectHeaderStyleButtonExtraOptions> { | ||
const QuillToolbarSelectHeaderStyleButtonsOptions({ | ||
super.afterButtonPressed, | ||
super.childBuilder, | ||
super.controller, | ||
super.iconData, | ||
super.iconTheme, | ||
super.tooltip, | ||
this.axis, | ||
this.attributes = const [ | ||
Attribute.header, | ||
Attribute.h1, | ||
Attribute.h2, | ||
Attribute.h3, | ||
], | ||
this.iconSize, | ||
}); | ||
|
||
final List<Attribute> attributes; | ||
|
||
/// By default we will the toolbar axis from [QuillToolbarConfigurations] | ||
final Axis? axis; | ||
final double? iconSize; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.