Replace Toolbar showHistory group with individual showRedo and showUndo (#603)

pull/605/head
mark8044 3 years ago committed by GitHub
parent 619524b043
commit f56532b874
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      lib/src/widgets/toolbar.dart

@ -94,7 +94,8 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget {
bool showQuote = true, bool showQuote = true,
bool showIndent = true, bool showIndent = true,
bool showLink = true, bool showLink = true,
bool showHistory = true, bool showUndo = true,
bool showRedo = true,
bool multiRowsDisplay = true, bool multiRowsDisplay = true,
bool showImageButton = true, bool showImageButton = true,
bool showVideoButton = true, bool showVideoButton = true,
@ -124,7 +125,6 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget {
Key? key, Key? key,
}) { }) {
final isButtonGroupShown = [ final isButtonGroupShown = [
showHistory ||
showBoldButton || showBoldButton ||
showItalicButton || showItalicButton ||
showSmallButton || showSmallButton ||
@ -155,7 +155,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget {
multiRowsDisplay: multiRowsDisplay, multiRowsDisplay: multiRowsDisplay,
locale: locale, locale: locale,
children: [ children: [
if (showHistory) if (showUndo)
HistoryButton( HistoryButton(
icon: Icons.undo_outlined, icon: Icons.undo_outlined,
iconSize: toolbarIconSize, iconSize: toolbarIconSize,
@ -163,7 +163,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget {
undo: true, undo: true,
iconTheme: iconTheme, iconTheme: iconTheme,
), ),
if (showHistory) if (showRedo)
HistoryButton( HistoryButton(
icon: Icons.redo_outlined, icon: Icons.redo_outlined,
iconSize: toolbarIconSize, iconSize: toolbarIconSize,

Loading…
Cancel
Save