2.9 KiB
- Removing the
QuillProvider
We got a lot of feedbacks about QuillProvider, while the provider help removing duplicate lines for simple usage, for more advance usage it become very messy
So from now on we will use providers for the QuillToolbar and QuillEditor only internally, you don't need it anymore
Instead you will need to pass the configurations directly in the QuillToolbar and QuillEditor
Old code:
QuillProvider(
configurations: QuillConfigurations(
controller: _controller,
sharedConfigurations: const QuillSharedConfigurations(),
),
child: Column(
children: [
const QuillToolbar(),
Expanded(
child: QuillEditor.basic(
configurations: const QuillEditorConfigurations(
readOnly: false, // true for view only mode
),
),
)
],
),
)
New code:
Column(
children: [
QuillToolbar.simple(
QuillSimpleToolbarConfigurations(controller: _controller)),
Expanded(
child: QuillEditor.basic(
configurations: QuillEditorConfigurations(controller: _controller),
),
)
],
)
- Refactoring the Base Toolbar
From now on, the QuillToolbar will be a widget that only provides the things that the buttons needs like localizations and QuillToolbarProvider
So you can define your own toolbar from scratch just like in Quill JS
The QuillToolbar is now accepting only child with no configurations so you can customize everything you wants, the QuillToolbar.simple() or QuillSimpleToolbar implements a simple toolbar that is based on QuillToolbar, you are free to use it but it just an example and not standard
- Source Code Structure
Completly changed the way how the source code structured to more basic and simple way, organize folders and file names, if you use the library
from flutter_quill_extensions.dart then there is nothing you need to do, but if you are using any other import then you need to re-imports
- Change the version system
For more details
-
Dependencies changes
- Add
gal_linuxinflutter_quill_extensions - Replace
pasteboardwithrich_cliboard - Remove
flutter_animate
- Add
-
Optional options for the buttons
All the buttons from now on, have optional options parameter
- Improve Flutter Quill Extensions
Bug fixes and new features, the extensions package keep getting better thanks to the community.
- Migrate to Material 3
We have migrated all of the buttons to material 3, removed a lot of old parameters, if you want to customize one or all the buttons to replacing it with completly different widget with the same state use the base in the button options for all or the button name for one
We have also replaced the header style buttons with one dropdown button as a default, replaced the alignment buttons with less code and a lot more