Skip to content

Commit 33e7c46

Browse files
authored
New merge from dev branch (#1602)
* Prepare to release 9.0.2
1 parent 4052779 commit 33e7c46

File tree

107 files changed

+1536
-718
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+1536
-718
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ jobs:
2525

2626
- name: Install dependencies
2727
run: flutter pub get
28+
29+
- name: Install dart_quill_delta dependencies
30+
run: flutter pub get -C dart_quill_delta
2831

2932
- name: Install flutter_quill_extensions dependencies
3033
run: flutter pub get -C flutter_quill_extensions

CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,30 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## 9.0.2
6+
* Release instead of pre-release
7+
8+
## 9.0.2-dev.3
9+
* Export `QuillSingleChildScrollView`
10+
11+
## 9.0.2-dev.2
12+
* Add the new translations for ru, uk arb files by [#1575](https://github.com/singerdmx/flutter-quill/pull/1575)
13+
* Add a new dropdown button by [#1575](https://github.com/singerdmx/flutter-quill/pull/1575)
14+
* Update the default style values by [#1575](https://github.com/singerdmx/flutter-quill/pull/1575)
15+
* Fix bug [#1562](https://github.com/singerdmx/flutter-quill/issues/1562)
16+
* Fix the second bug of [#1480](https://github.com/singerdmx/flutter-quill/issues/1480)
17+
18+
## 9.0.2-dev.1
19+
* Add configurations for the new dropdown `QuillToolbarSelectHeaderStyleButton`, you can use the orignal one or this
20+
* Fix the [issue](https://github.com/singerdmx/flutter-quill/issues/1119) when enter is pressed, all font settings is lost
21+
22+
## 9.0.2-dev
23+
* **Breaking change** Remove the spacer widget, removed the controller option for each button
24+
* Add `toolbarRunSpacing` property to the simple toolbar
25+
26+
## 9.0.1
27+
* Fix default icon size
28+
529
## 9.0.0
630
* This version is quite stable but it's not how we wanted to be, because the lack of time and there are not too many maintainers active, we decided to publish it, we might make a new breaking changes verion
731

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ QuillController _controller = QuillController.basic();
127127

128128
And then use the `QuillEditor`, `QuillToolbar` widgets,
129129
connect the `QuillController` to them
130-
using `QuillProvider` inherited widget
131130

132131
```dart
133132
QuillToolbar.simple(

example/lib/main.dart

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,22 @@ class MyApp extends StatelessWidget {
4747
builder: (context, state) {
4848
return MaterialApp(
4949
title: 'Flutter Quill Demo',
50-
theme: ThemeData.light(useMaterial3: true),
51-
darkTheme: ThemeData.dark(useMaterial3: true),
50+
theme: ThemeData(
51+
useMaterial3: true,
52+
visualDensity: VisualDensity.adaptivePlatformDensity,
53+
colorScheme: ColorScheme.fromSeed(
54+
brightness: Brightness.light,
55+
seedColor: Colors.red,
56+
),
57+
),
58+
darkTheme: ThemeData(
59+
useMaterial3: true,
60+
visualDensity: VisualDensity.adaptivePlatformDensity,
61+
colorScheme: ColorScheme.fromSeed(
62+
brightness: Brightness.dark,
63+
seedColor: Colors.red,
64+
),
65+
),
5266
themeMode: state.themeMode,
5367
debugShowCheckedModeBanner: false,
5468
localizationsDelegates: const [

example/lib/presentation/quill/my_quill_editor.dart

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,22 @@ class MyQuillEditor extends StatelessWidget {
3333
scrollController: scrollController,
3434
focusNode: focusNode,
3535
configurations: configurations.copyWith(
36+
elementOptions: const QuillEditorElementOptions(
37+
codeBlock: QuillEditorCodeBlockElementOptions(
38+
enableLineNumbers: true,
39+
),
40+
// orderedList: QuillEditorOrderedListElementOptions(
41+
// backgroundColor: Colors.amber,
42+
// fontColor: Colors.black,
43+
// ),
44+
// unorderedList: QuillEditorUnOrderedListElementOptions(
45+
// backgroundColor: Colors.green,
46+
// fontColor: Colors.red,
47+
// ),
48+
unorderedList: QuillEditorUnOrderedListElementOptions(
49+
useTextColorForDot: false,
50+
),
51+
),
3652
customStyles: const DefaultStyles(
3753
h1: DefaultTextBlockStyle(
3854
TextStyle(

example/lib/presentation/quill/my_quill_toolbar.dart

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -100,17 +100,10 @@ class MyQuillToolbar extends StatelessWidget {
100100
// For more info
101101
// https://github.com/singerdmx/flutter-quill/blob/master/doc/custom_toolbar.md
102102
return QuillToolbar(
103-
configurations: const QuillToolbarConfigurations(
104-
buttonOptions: QuillToolbarButtonOptions(
105-
base: QuillToolbarBaseButtonOptions(
106-
globalIconSize: 20,
107-
globalIconButtonFactor: 1.4,
108-
),
109-
),
110-
),
103+
configurations: const QuillToolbarConfigurations(),
111104
child: SingleChildScrollView(
112105
scrollDirection: Axis.horizontal,
113-
child: Row(
106+
child: Wrap(
114107
children: [
115108
IconButton(
116109
onPressed: () => context
@@ -166,7 +159,7 @@ class MyQuillToolbar extends StatelessWidget {
166159
isBackground: true,
167160
),
168161
const VerticalDivider(),
169-
QuillToolbarSelectHeaderStyleButton(
162+
QuillToolbarSelectHeaderStyleDropdownButton(
170163
controller: controller,
171164
),
172165
const VerticalDivider(),
@@ -204,14 +197,24 @@ class MyQuillToolbar extends StatelessWidget {
204197
),
205198
);
206199
}
207-
return QuillSimpleToolbar(
200+
return QuillToolbar.simple(
208201
configurations: QuillSimpleToolbarConfigurations(
209202
controller: controller,
210203
showAlignmentButtons: true,
211-
buttonOptions: QuillToolbarButtonOptions(
204+
buttonOptions: QuillSimpleToolbarButtonOptions(
212205
base: QuillToolbarBaseButtonOptions(
213206
// Request editor focus when any button is pressed
214207
afterButtonPressed: focusNode.requestFocus,
208+
globalIconSize: 18,
209+
),
210+
selectHeaderStyleDropdownButton:
211+
const QuillToolbarSelectHeaderStyleDropdownButtonOptions(
212+
textStyle: TextStyle(
213+
fontSize: 20,
214+
),
215+
iconTheme: QuillIconTheme(
216+
iconSelectedColor: Colors.red,
217+
),
215218
),
216219
),
217220
customButtons: [

example/lib/presentation/quill/quill_screen.dart

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class _QuillScreenState extends State<QuillScreen> {
7676
onPressed: () {
7777
final html = _controller.document.toDelta().toHtml();
7878
_controller.document =
79-
Document.fromDelta(QuillController.fromHtml(html));
79+
Document.fromDelta(Document.fromHtml(html));
8080
},
8181
icon: const Icon(Icons.html),
8282
),
@@ -126,20 +126,6 @@ class _QuillScreenState extends State<QuillScreen> {
126126
sharedConfigurations: _sharedConfigurations,
127127
controller: _controller,
128128
readOnly: _isReadOnly,
129-
customStyles: const DefaultStyles(),
130-
elementOptions: const QuillEditorElementOptions(
131-
codeBlock: QuillEditorCodeBlockElementOptions(
132-
enableLineNumbers: true,
133-
),
134-
// orderedList: QuillEditorOrderedListElementOptions(
135-
// backgroundColor: Colors.amber,
136-
// fontColor: Colors.black,
137-
// ),
138-
// unorderedList: QuillEditorUnOrderedListElementOptions(
139-
// backgroundColor: Colors.green,
140-
// fontColor: Colors.red,
141-
// ),
142-
),
143129
),
144130
scrollController: _editorScrollController,
145131
focusNode: _editorFocusNode,

flutter_quill_extensions/CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,30 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## 9.0.2
6+
* Release instead of pre-release
7+
8+
## 9.0.2-dev.3
9+
* Export `QuillSingleChildScrollView`
10+
11+
## 9.0.2-dev.2
12+
* Add the new translations for ru, uk arb files by [#1575](https://github.com/singerdmx/flutter-quill/pull/1575)
13+
* Add a new dropdown button by [#1575](https://github.com/singerdmx/flutter-quill/pull/1575)
14+
* Update the default style values by [#1575](https://github.com/singerdmx/flutter-quill/pull/1575)
15+
* Fix bug [#1562](https://github.com/singerdmx/flutter-quill/issues/1562)
16+
* Fix the second bug of [#1480](https://github.com/singerdmx/flutter-quill/issues/1480)
17+
18+
## 9.0.2-dev.1
19+
* Add configurations for the new dropdown `QuillToolbarSelectHeaderStyleButton`, you can use the orignal one or this
20+
* Fix the [issue](https://github.com/singerdmx/flutter-quill/issues/1119) when enter is pressed, all font settings is lost
21+
22+
## 9.0.2-dev
23+
* **Breaking change** Remove the spacer widget, removed the controller option for each button
24+
* Add `toolbarRunSpacing` property to the simple toolbar
25+
26+
## 9.0.1
27+
* Fix default icon size
28+
529
## 9.0.0
630
* This version is quite stable but it's not how we wanted to be, because the lack of time and there are not too many maintainers active, we decided to publish it, we might make a new breaking changes verion
731

flutter_quill_extensions/README.md

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -93,37 +93,6 @@ Expanded(
9393
)
9494
```
9595

96-
They both should have a parent `QuillProvider` in the widget tree and set properly <br>
97-
Example:
98-
99-
```dart
100-
QuillProvider(
101-
configurations: QuillConfigurations(
102-
controller: _controller,
103-
sharedConfigurations: const QuillSharedConfigurations(),
104-
),
105-
child: Column(
106-
children: [
107-
QuillToolbar(
108-
configurations: QuillToolbarConfigurations(
109-
embedButtons: FlutterQuillEmbeds.toolbarButtons(
110-
imageButtonOptions: QuillToolbarImageButtonOptions(),
111-
),
112-
),
113-
),
114-
Expanded(
115-
child: QuillEditor.basic(
116-
configurations: QuillEditorConfigurations(
117-
padding: const EdgeInsets.all(16),
118-
embedBuilders: kIsWeb ? FlutterQuillEmbeds.editorWebBuilders() : FlutterQuillEmbeds.editorBuilders(),
119-
),
120-
),
121-
)
122-
],
123-
),
124-
)
125-
```
126-
12796
## Embed Blocks
12897

12998
As of version [flutter_quill](https://pub.dev/packages/flutter_quill) 6.0, embed blocks are not provided by default as part of Flutter quill. Instead, it provides an interface for all the users to provide their implementations for embed blocks. Implementations for image, video, and formula embed blocks are proved in this package

flutter_quill_extensions/lib/flutter_quill_extensions.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,19 +180,19 @@ class FlutterQuillEmbeds {
180180
if (imageButtonOptions != null)
181181
(controller, toolbarIconSize, iconTheme, dialogTheme) =>
182182
QuillToolbarImageButton(
183-
controller: imageButtonOptions.controller ?? controller,
183+
controller: controller,
184184
options: imageButtonOptions,
185185
),
186186
if (videoButtonOptions != null)
187187
(controller, toolbarIconSize, iconTheme, dialogTheme) =>
188188
QuillToolbarVideoButton(
189-
controller: videoButtonOptions.controller ?? controller,
189+
controller: controller,
190190
options: videoButtonOptions,
191191
),
192192
if (cameraButtonOptions != null)
193193
(controller, toolbarIconSize, iconTheme, dialogTheme) =>
194194
QuillToolbarCameraButton(
195-
controller: cameraButtonOptions.controller ?? controller,
195+
controller: controller,
196196
options: cameraButtonOptions,
197197
),
198198
// TODO: We will return the support for this later

0 commit comments

Comments
 (0)