|
|
@ -49,8 +49,6 @@ typedef WebVideoPickImpl = Future<String?> Function( |
|
|
|
typedef MediaPickSettingSelector = Future<MediaPickSetting?> Function( |
|
|
|
typedef MediaPickSettingSelector = Future<MediaPickSetting?> Function( |
|
|
|
BuildContext context); |
|
|
|
BuildContext context); |
|
|
|
|
|
|
|
|
|
|
|
enum ToolbarAlignment { start, center, end } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// The default size of the icon of a button. |
|
|
|
// The default size of the icon of a button. |
|
|
|
const double kDefaultIconSize = 18; |
|
|
|
const double kDefaultIconSize = 18; |
|
|
|
|
|
|
|
|
|
|
@ -74,7 +72,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { |
|
|
|
required QuillController controller, |
|
|
|
required QuillController controller, |
|
|
|
double toolbarIconSize = kDefaultIconSize, |
|
|
|
double toolbarIconSize = kDefaultIconSize, |
|
|
|
double toolBarSectionSpacing = 4, |
|
|
|
double toolBarSectionSpacing = 4, |
|
|
|
ToolbarAlignment toolBarIconAlignment = ToolbarAlignment.center, |
|
|
|
WrapAlignment toolBarIconAlignment = WrapAlignment.center, |
|
|
|
bool showBoldButton = true, |
|
|
|
bool showBoldButton = true, |
|
|
|
bool showItalicButton = true, |
|
|
|
bool showItalicButton = true, |
|
|
|
bool showSmallButton = false, |
|
|
|
bool showSmallButton = false, |
|
|
@ -418,7 +416,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { |
|
|
|
final List<Widget> children; |
|
|
|
final List<Widget> children; |
|
|
|
final double toolBarHeight; |
|
|
|
final double toolBarHeight; |
|
|
|
final double? toolBarSectionSpacing; |
|
|
|
final double? toolBarSectionSpacing; |
|
|
|
final ToolbarAlignment? toolBarIconAlignment; |
|
|
|
final WrapAlignment? toolBarIconAlignment; |
|
|
|
final bool? multiRowsDisplay; |
|
|
|
final bool? multiRowsDisplay; |
|
|
|
|
|
|
|
|
|
|
|
/// The color of the toolbar. |
|
|
|
/// The color of the toolbar. |
|
|
@ -446,13 +444,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { |
|
|
|
initialLocale: locale, |
|
|
|
initialLocale: locale, |
|
|
|
child: multiRowsDisplay ?? true |
|
|
|
child: multiRowsDisplay ?? true |
|
|
|
? Wrap( |
|
|
|
? Wrap( |
|
|
|
alignment: (toolBarIconAlignment == ToolbarAlignment.start) |
|
|
|
alignment: toolBarIconAlignment ?? WrapAlignment.center, |
|
|
|
? WrapAlignment.start |
|
|
|
|
|
|
|
: (toolBarIconAlignment == ToolbarAlignment.center) |
|
|
|
|
|
|
|
? WrapAlignment.center |
|
|
|
|
|
|
|
: (toolBarIconAlignment == ToolbarAlignment.end) |
|
|
|
|
|
|
|
? WrapAlignment.end |
|
|
|
|
|
|
|
: WrapAlignment.center, |
|
|
|
|
|
|
|
runSpacing: 4, |
|
|
|
runSpacing: 4, |
|
|
|
spacing: toolBarSectionSpacing ?? 4, |
|
|
|
spacing: toolBarSectionSpacing ?? 4, |
|
|
|
children: children, |
|
|
|
children: children, |
|
|
|