add the parameter to hide the camera (#278)

pull/286/head
Benjamin Liii 4 years ago committed by GitHub
parent 5c7bede059
commit 503127dfa3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      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,

Loading…
Cancel
Save