Skip to content

Commit

Permalink
add the parameter to hide the camera (singerdmx#278)
Browse files Browse the repository at this point in the history
  • Loading branch information
renntbenrennt committed Jul 6, 2021
1 parent 5c7bede commit 503127d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/src/widgets/toolbar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 503127d

Please sign in to comment.