dartlangeditorflutterflutter-appsflutter-examplesflutter-packageflutter-widgetquillquill-deltaquilljsreactquillrich-textrich-text-editorwysiwygwysiwyg-editor
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
83 lines
2.9 KiB
83 lines
2.9 KiB
1 year ago
|
1. 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**:
|
||
|
|
||
|
```dart
|
||
|
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**:
|
||
|
|
||
|
```dart
|
||
|
|
||
|
Column(
|
||
|
children: [
|
||
|
QuillToolbar.simple(
|
||
|
QuillSimpleToolbarConfigurations(controller: _controller)),
|
||
|
Expanded(
|
||
|
child: QuillEditor.basic(
|
||
|
configurations: QuillEditorConfigurations(controller: _controller),
|
||
|
),
|
||
|
)
|
||
|
],
|
||
|
)
|
||
|
|
||
|
```
|
||
|
|
||
|
2. 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
|
||
|
|
||
|
1. 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
|
||
|
|
||
|
4. Change the version system
|
||
|
|
||
|
For [more details](https://github.com/singerdmx/flutter-quill/discussions/1560)
|
||
|
|
||
|
5. Dependencies changes
|
||
|
|
||
|
1. Add `gal_linux` in `flutter_quill_extensions`
|
||
|
2. Replace `pasteboard` with `rich_cliboard`
|
||
|
3. Remove `flutter_animate`
|
||
|
|
||
|
6. Optional options for the buttons
|
||
|
|
||
|
All the buttons from now on, have optional options parameter
|
||
|
|
||
|
7. Improve Flutter Quill Extensions
|
||
|
|
||
|
Bug fixes and new features, the extensions package keep getting better thanks to the community.
|
||
|
|
||
|
8. 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
|