From d10a98c6e217b0f4fd8aa55c6c1f3de06777a999 Mon Sep 17 00:00:00 2001 From: Adil Hanney Date: Wed, 15 Feb 2023 04:26:28 +0000 Subject: [PATCH] Remove deprecated `toolbarHeight` in `QuillToolbar` --- lib/src/widgets/toolbar.dart | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/src/widgets/toolbar.dart b/lib/src/widgets/toolbar.dart index d642b917..28bf610e 100644 --- a/lib/src/widgets/toolbar.dart +++ b/lib/src/widgets/toolbar.dart @@ -43,12 +43,10 @@ const double kDefaultIconSize = 18; const double kIconButtonFactor = 1.77; class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { - QuillToolbar({ + const QuillToolbar({ required this.children, this.axis = Axis.horizontal, - @Deprecated('Use toolbarSize instead') - double? toolbarHeight, - double? toolbarSize, + this.toolbarSize = 36, this.toolbarIconAlignment = WrapAlignment.center, this.toolbarSectionSpacing = 4, this.multiRowsDisplay = true, @@ -57,9 +55,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { this.locale, VoidCallback? afterButtonPressed, Key? key, - }) : super(key: key) { - this.toolbarSize = toolbarSize ?? toolbarHeight ?? 36; - } + }) : super(key: key); factory QuillToolbar.basic({ required QuillController controller, @@ -512,7 +508,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { final List children; final Axis axis; - late final double toolbarSize; + final double toolbarSize; final double toolbarSectionSpacing; final WrapAlignment toolbarIconAlignment; final bool multiRowsDisplay;