From 61ed9496e8c7548d44747551036f279108e28f3b Mon Sep 17 00:00:00 2001 From: AtlasAutocode Date: Sat, 20 Apr 2024 08:49:06 -0600 Subject: [PATCH] Value setting Stateful toolbar buttons derive from base class --- lib/src/controller/quill_controller.dart | 43 ++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/lib/src/controller/quill_controller.dart b/lib/src/controller/quill_controller.dart index 57e3ed42..781a0660 100644 --- a/lib/src/controller/quill_controller.dart +++ b/lib/src/controller/quill_controller.dart @@ -101,6 +101,49 @@ class QuillController extends ChangeNotifier { notifyListeners(); } + // Those are the values that the user selects and not the one + // from the current line + + /// The current font family, null to use the default one + @Deprecated('No longer used') + MapEntry? _selectedFontFamily; + + /// The current font family, null to use the default one + @Deprecated('No longer used') + MapEntry? get selectedFontFamily => _selectedFontFamily; + + @Deprecated('No longer used') + void selectFontFamily(MapEntry? newFontFamily) { + _selectedFontFamily = newFontFamily; + } + + /// The current font size, null to use the default one + @Deprecated('No longer used') + MapEntry? _selectedFontSize; + + /// The current font size, null to use the default one + @Deprecated('No longer used') + MapEntry? get selectedFontSize => _selectedFontSize; + + @Deprecated('No longer used') + void selectFontSize(MapEntry? newFontSize) { + _selectedFontSize = newFontSize; + } + + /// For the [QuillToolbarToggleStyleButton] + @Deprecated('No longer used') + final Map _selectedStyles = {}; + + /// For the [QuillToolbarToggleStyleButton] + @Deprecated('No longer used') + Map get selectedStyles => _selectedStyles; + + /// For the [QuillToolbarToggleStyleButton] + @Deprecated('No longer used') + void selectStyle(Attribute attribute, bool value) { + _selectedStyles[attribute] = value; + } + /// Tells whether to keep or reset the [toggledStyle] /// when user adds a new line. final bool keepStyleOnNewLine;