From 503127dfa3f47b7d37ca2afdae5a62900c8db51b Mon Sep 17 00:00:00 2001 From: Benjamin Liii Date: Tue, 6 Jul 2021 12:50:11 +0800 Subject: [PATCH] add the parameter to hide the camera (#278) --- 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 710778ad..af36d706 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,