Skip to content

Commit 05a8d9b

Browse files
EchoElletEllet
and
Ellet
authored
Revert the "Revert to material 2 from 3" because of the broken changes (singerdmx#1625)
* Revert "Fix build error" This reverts commit 90738e1. * Revert "Prepare to release 9.1.0" This reverts commit c3d57b8. * Revert "Revert from material 3 to material 2" This reverts commit 07b8f40. * Revert "Restore old feel and look (singerdmx#1621)" This reverts commit e820c5b. --------- Co-authored-by: Ellet <[email protected]>
1 parent 4934348 commit 05a8d9b

33 files changed

+232
-709
lines changed

CHANGELOG.md

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

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

5-
## 9.1.0
6-
* Because most of the users still uses material 2, we have to revert back to old buttons of `7.0.0`, take a look at [https://github.com/singerdmx/flutter-quill/pull/1621/](https://github.com/singerdmx/flutter-quill/pull/1621/)
7-
85
## 9.0.4
96
* Feature: [#1611](https://github.com/singerdmx/flutter-quill/issues/1611)
107
* Export missing widgets

example/lib/presentation/quill/my_quill_toolbar.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ class MyQuillToolbar extends StatelessWidget {
210210
),
211211
selectHeaderStyleDropdownButton:
212212
const QuillToolbarSelectHeaderStyleDropdownButtonOptions(
213-
style: TextStyle(
213+
textStyle: TextStyle(
214214
fontSize: 20,
215215
),
216216
iconTheme: QuillIconTheme(

flutter_quill_extensions/CHANGELOG.md

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

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

5-
## 9.1.0
6-
* Because most of the users still uses material 2, we have to revert back to old buttons of `7.0.0`, take a look at [https://github.com/singerdmx/flutter-quill/pull/1621/](https://github.com/singerdmx/flutter-quill/pull/1621/)
7-
85
## 9.0.4
96
* Feature: [#1611](https://github.com/singerdmx/flutter-quill/issues/1611)
107
* Export missing widgets

flutter_quill_extensions/lib/embeds/formula/toolbar/formula_button.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ class QuillToolbarFormulaButton extends StatelessWidget {
9494
icon: Icon(iconData, size: iconSize * iconButtonFactor, color: iconColor),
9595
tooltip: tooltip,
9696
onPressed: () => _sharedOnPressed(context),
97+
isFilled: false,
9798
);
9899
}
99100

flutter_quill_extensions/lib/embeds/image/toolbar/image_button.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ class QuillToolbarImageButton extends StatelessWidget {
109109
color: iconColor,
110110
),
111111
tooltip: tooltip,
112+
isFilled: false,
112113
onPressed: () => _sharedOnPressed(context),
113114
);
114115
}

flutter_quill_extensions/lib/embeds/others/camera_button/camera_button.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ class QuillToolbarCameraButton extends StatelessWidget {
108108
return QuillToolbarIconButton(
109109
icon: Icon(iconData, size: iconButtonFactor * iconSize, color: iconColor),
110110
tooltip: tooltip,
111+
isFilled: false,
112+
// isDesktop(supportWeb: false) ? null :
111113
onPressed: () => _sharedOnPressed(context),
112114
);
113115
}

flutter_quill_extensions/lib/embeds/video/toolbar/video_button.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ class QuillToolbarVideoButton extends StatelessWidget {
108108
return QuillToolbarIconButton(
109109
icon: Icon(iconData, size: iconSize * iconButtonFactor, color: iconColor),
110110
tooltip: tooltip,
111+
isFilled: false,
111112
onPressed: () => _sharedOnPressed(context),
112113
);
113114
}

flutter_quill_extensions/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: flutter_quill_extensions
22
description: Embed extensions for flutter_quill including image, video, formula and etc.
3-
version: 9.1.0
3+
version: 9.0.4
44
homepage: https://github.com/singerdmx/flutter-quill/tree/master/flutter_quill_extensions/
55
repository: https://github.com/singerdmx/flutter-quill/tree/master/flutter_quill_extensions/
66
issue_tracker: https://github.com/singerdmx/flutter-quill/issues/

flutter_quill_test/CHANGELOG.md

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

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

5-
## 9.1.0
6-
* Because most of the users still uses material 2, we have to revert back to old buttons of `7.0.0`, take a look at [https://github.com/singerdmx/flutter-quill/pull/1621/](https://github.com/singerdmx/flutter-quill/pull/1621/)
7-
85
## 9.0.4
96
* Feature: [#1611](https://github.com/singerdmx/flutter-quill/issues/1611)
107
* Export missing widgets

flutter_quill_test/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: flutter_quill_test
22
description: Test utilities for flutter_quill which includes methods to simplify interacting with the editor in test cases.
3-
version: 9.1.0
3+
version: 9.0.4
44
homepage: https://github.com/singerdmx/flutter-quill/tree/master/flutter_quill_test/
55
repository: https://github.com/singerdmx/flutter-quill/tree/master/flutter_quill_test/
66
issue_tracker: https://github.com/singerdmx/flutter-quill/issues/

lib/flutter_quill.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export 'src/widgets/raw_editor/raw_editor.dart';
3333
export 'src/widgets/raw_editor/raw_editor_state.dart';
3434
export 'src/widgets/style_widgets/style_widgets.dart';
3535
export 'src/widgets/toolbar/base_toolbar.dart';
36+
export 'src/widgets/toolbar/buttons/alignment/select_alignment_button.dart';
3637
export 'src/widgets/toolbar/buttons/hearder_style/select_header_style_dropdown_button.dart';
3738
export 'src/widgets/toolbar/simple_toolbar.dart';
3839
export 'src/widgets/utils/provider.dart';

lib/src/models/config/toolbar/buttons/font_family_configurations.dart

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,11 @@ class QuillToolbarFontFamilyButtonOptions extends QuillToolbarBaseButtonOptions<
4949
this.itemPadding,
5050
this.defaultItemColor = Colors.red,
5151
this.renderFontFamilies = true,
52-
this.highlightElevation = 1,
53-
this.hoverElevation = 1,
54-
this.fillColor,
5552
this.iconSize,
5653
this.iconButtonFactor,
5754
});
5855

59-
final Color? fillColor;
60-
final double hoverElevation;
61-
final double highlightElevation;
62-
63-
/// By default it will be [fontFamilyValues] from [QuillToolbarConfigurations]
56+
/// By default it will be [fontFamilyValues] from [QuillSimpleToolbarConfigurations]
6457
/// You can override this if you want
6558
final Map<String, String>? rawItemsMap;
6659
final ValueChanged<String>? onSelected;
@@ -82,9 +75,6 @@ class QuillToolbarFontFamilyButtonOptions extends QuillToolbarBaseButtonOptions<
8275
final double? iconButtonFactor;
8376

8477
QuillToolbarFontFamilyButtonOptions copyWith({
85-
Color? fillColor,
86-
double? hoverElevation,
87-
double? highlightElevation,
8878
List<PopupMenuEntry<String>>? items,
8979
Map<String, String>? rawItemsMap,
9080
ValueChanged<String>? onSelected,
@@ -101,8 +91,6 @@ class QuillToolbarFontFamilyButtonOptions extends QuillToolbarBaseButtonOptions<
10191
Color? defaultItemColor,
10292
double? iconSize,
10393
double? iconButtonFactor,
104-
// Add properties to override inherited properties
105-
QuillController? controller,
10694
IconData? iconData,
10795
VoidCallback? afterButtonPressed,
10896
String? tooltip,
@@ -129,9 +117,6 @@ class QuillToolbarFontFamilyButtonOptions extends QuillToolbarBaseButtonOptions<
129117
defaultItemColor: defaultItemColor ?? this.defaultItemColor,
130118
iconSize: iconSize ?? this.iconSize,
131119
iconButtonFactor: iconButtonFactor ?? this.iconButtonFactor,
132-
fillColor: fillColor ?? this.fillColor,
133-
hoverElevation: hoverElevation ?? this.hoverElevation,
134-
highlightElevation: highlightElevation ?? this.highlightElevation,
135120
);
136121
}
137122
}

lib/src/models/config/toolbar/buttons/font_size_configurations.dart

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@ import 'dart:ui';
22

33
import 'package:flutter/foundation.dart' show immutable;
44
import 'package:flutter/material.dart'
5-
show Colors, PopupMenuEntry, ValueChanged;
5+
show ButtonStyle, Colors, PopupMenuEntry, ValueChanged;
66
import 'package:flutter/widgets.dart'
7-
show Color, EdgeInsets, EdgeInsetsGeometry, TextOverflow, TextStyle;
7+
show
8+
Color,
9+
EdgeInsets,
10+
EdgeInsetsGeometry,
11+
OutlinedBorder,
12+
TextOverflow,
13+
TextStyle;
814

915
import '../../../documents/attribute.dart';
1016
import '../../quill_configurations.dart';
@@ -29,9 +35,6 @@ class QuillToolbarFontSizeButtonOptions extends QuillToolbarBaseButtonOptions<
2935
const QuillToolbarFontSizeButtonOptions({
3036
this.iconSize,
3137
this.iconButtonFactor,
32-
this.fillColor,
33-
this.hoverElevation = 1,
34-
this.highlightElevation = 1,
3538
this.rawItemsMap,
3639
this.onSelected,
3740
this.attribute = Attribute.size,
@@ -46,15 +49,15 @@ class QuillToolbarFontSizeButtonOptions extends QuillToolbarBaseButtonOptions<
4649
this.itemPadding,
4750
this.defaultItemColor = Colors.red,
4851
super.childBuilder,
52+
this.shape,
4953
});
5054

5155
final double? iconSize;
5256
final double? iconButtonFactor;
53-
final Color? fillColor;
54-
final double hoverElevation;
55-
final double highlightElevation;
5657

57-
/// By default it will be [fontSizesValues] from [QuillToolbarConfigurations]
58+
final ButtonStyle? shape;
59+
60+
/// By default it will be [fontSizesValues] from [QuillSimpleToolbarConfigurations]
5861
/// You can override this if you want
5962
final Map<String, String>? rawItemsMap;
6063
final ValueChanged<String>? onSelected;
@@ -88,13 +91,11 @@ class QuillToolbarFontSizeButtonOptions extends QuillToolbarBaseButtonOptions<
8891
Color? defaultItemColor,
8992
VoidCallback? afterButtonPressed,
9093
String? tooltip,
94+
OutlinedBorder? shape,
9195
}) {
9296
return QuillToolbarFontSizeButtonOptions(
9397
iconSize: iconSize ?? this.iconSize,
9498
iconButtonFactor: iconButtonFactor ?? this.iconButtonFactor,
95-
fillColor: fillColor ?? this.fillColor,
96-
hoverElevation: hoverElevation ?? this.hoverElevation,
97-
highlightElevation: highlightElevation ?? this.highlightElevation,
9899
rawItemsMap: rawItemsMap ?? this.rawItemsMap,
99100
onSelected: onSelected ?? this.onSelected,
100101
attribute: attribute ?? this.attribute,
Lines changed: 24 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import 'package:flutter/material.dart';
1+
import 'package:flutter/widgets.dart'
2+
show IconData, TextStyle, ValueChanged, VoidCallback;
23

3-
import '../../../../widgets/quill/quill_controller.dart';
4+
import '../../../../widgets/toolbar/base_toolbar.dart';
45
import '../../../documents/attribute.dart';
56
import '../../../themes/quill_icon_theme.dart';
6-
import '../../quill_configurations.dart';
77

88
class QuillToolbarSelectHeaderStyleDropdownButtonExtraOptions
99
extends QuillToolbarBaseButtonExtraOptions {
@@ -21,89 +21,55 @@ class QuillToolbarSelectHeaderStyleDropdownButtonOptions
2121
QuillToolbarSelectHeaderStyleDropdownButtonOptions,
2222
QuillToolbarSelectHeaderStyleDropdownButtonExtraOptions> {
2323
const QuillToolbarSelectHeaderStyleDropdownButtonOptions({
24-
super.iconData,
2524
super.afterButtonPressed,
26-
super.tooltip,
27-
super.iconTheme,
2825
super.childBuilder,
26+
super.iconTheme,
27+
super.tooltip,
2928
this.iconSize,
3029
this.iconButtonFactor,
31-
this.fillColor,
32-
this.hoverElevation = 0,
33-
this.highlightElevation = 0,
34-
this.onSelected,
30+
this.textStyle,
31+
super.iconData,
3532
this.attributes,
36-
this.padding,
37-
this.style,
38-
this.width,
39-
this.labelOverflow = TextOverflow.visible,
40-
this.itemHeight,
41-
this.itemPadding,
42-
this.defaultItemColor,
43-
this.renderItemTextStyle = false,
4433
});
4534

35+
/// By default we will the toolbar axis from [QuillSimpleToolbarConfigurations]
4636
final double? iconSize;
4737
final double? iconButtonFactor;
48-
final Color? fillColor;
49-
final double hoverElevation;
50-
final double highlightElevation;
51-
final ValueChanged<String>? onSelected;
52-
final List<Attribute>? attributes;
53-
final EdgeInsetsGeometry? padding;
54-
final TextStyle? style;
55-
final double? width;
56-
final TextOverflow labelOverflow;
57-
final double? itemHeight;
58-
final EdgeInsets? itemPadding;
59-
final Color? defaultItemColor;
60-
final bool renderItemTextStyle;
38+
final TextStyle? textStyle;
39+
40+
/// Header attributes, defaults to:
41+
/// ```dart
42+
/// [
43+
/// Attribute.h1,
44+
/// Attribute.h2,
45+
/// Attribute.h3,
46+
/// Attribute.h4,
47+
/// Attribute.h5,
48+
/// Attribute.h6,
49+
/// Attribute.header,
50+
/// ]
51+
/// ```
52+
final List<Attribute<int>>? attributes;
6153

6254
QuillToolbarSelectHeaderStyleDropdownButtonOptions copyWith({
63-
Color? fillColor,
64-
double? hoverElevation,
65-
double? highlightElevation,
66-
List<PopupMenuEntry<String>>? items,
6755
ValueChanged<String>? onSelected,
68-
List<Attribute>? attributes,
69-
EdgeInsetsGeometry? padding,
56+
List<Attribute<int>>? attributes,
7057
TextStyle? style,
71-
double? width,
72-
TextOverflow? labelOverflow,
73-
bool? renderFontFamilies,
74-
bool? overrideTooltipByFontFamily,
75-
double? itemHeight,
76-
EdgeInsets? itemPadding,
77-
Color? defaultItemColor,
7858
double? iconSize,
7959
double? iconButtonFactor,
80-
QuillController? controller,
8160
IconData? iconData,
8261
VoidCallback? afterButtonPressed,
8362
String? tooltip,
8463
QuillIconTheme? iconTheme,
85-
bool? renderItemTextStyle,
8664
}) {
8765
return QuillToolbarSelectHeaderStyleDropdownButtonOptions(
8866
attributes: attributes ?? this.attributes,
8967
iconData: iconData ?? this.iconData,
9068
afterButtonPressed: afterButtonPressed ?? this.afterButtonPressed,
9169
tooltip: tooltip ?? this.tooltip,
9270
iconTheme: iconTheme ?? this.iconTheme,
93-
onSelected: onSelected ?? this.onSelected,
94-
padding: padding ?? this.padding,
95-
style: style ?? this.style,
96-
width: width ?? this.width,
97-
labelOverflow: labelOverflow ?? this.labelOverflow,
98-
itemHeight: itemHeight ?? this.itemHeight,
99-
itemPadding: itemPadding ?? this.itemPadding,
100-
defaultItemColor: defaultItemColor ?? this.defaultItemColor,
10171
iconSize: iconSize ?? this.iconSize,
10272
iconButtonFactor: iconButtonFactor ?? this.iconButtonFactor,
103-
fillColor: fillColor ?? this.fillColor,
104-
hoverElevation: hoverElevation ?? this.hoverElevation,
105-
highlightElevation: highlightElevation ?? this.highlightElevation,
106-
renderItemTextStyle: renderItemTextStyle ?? this.renderItemTextStyle,
10773
);
10874
}
10975
}

lib/src/widgets/toolbar/base_toolbar.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import 'simple_toolbar.dart';
99

1010
export '../../models/config/toolbar/base_button_configurations.dart';
1111
export '../../models/config/toolbar/simple_toolbar_configurations.dart';
12-
export 'buttons/alignment/select_alignment_button_original.dart';
1312
export 'buttons/clear_format_button.dart';
1413
export 'buttons/color/color_button.dart';
1514
export 'buttons/custom_button_button.dart';

0 commit comments

Comments
 (0)