From 234245d7ff6d635abff94a1c10c1e0078baaa1ca Mon Sep 17 00:00:00 2001 From: Benjamin Li Date: Wed, 30 Jun 2021 16:59:48 +0800 Subject: [PATCH] add the parameter to hide the camera --- lib/src/widgets/toolbar.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/src/widgets/toolbar.dart b/lib/src/widgets/toolbar.dart index d76ef913..b5543f99 100644 --- a/lib/src/widgets/toolbar.dart +++ b/lib/src/widgets/toolbar.dart @@ -74,6 +74,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { bool showHistory = true, bool showHorizontalRule = false, bool multiRowsDisplay = true, + bool showCamera = true, OnImagePickCallback? onImagePickCallback, FilePickImpl? filePickImpl, WebImagePickImpl? webImagePickImpl, @@ -172,7 +173,7 @@ class QuillToolbar extends StatelessWidget implements PreferredSizeWidget { filePickImpl: filePickImpl, webImagePickImpl: webImagePickImpl, ), - if (onImagePickCallback != null) + if (onImagePickCallback != null && showCamera) ImageButton( icon: Icons.photo_camera, iconSize: toolbarIconSize,