diff --git a/packages/fleather/lib/src/widgets/editor_toolbar.dart b/packages/fleather/lib/src/widgets/editor_toolbar.dart index e9852a5b..18bed9e9 100644 --- a/packages/fleather/lib/src/widgets/editor_toolbar.dart +++ b/packages/fleather/lib/src/widgets/editor_toolbar.dart @@ -851,6 +851,7 @@ class FleatherToolbar extends StatefulWidget implements PreferredSizeWidget { bool hideHorizontalRule = false, bool hideDirection = false, bool hideUndoRedo = false, + VoidCallback? onImagePressed, List leading = const [], List trailing = const [], bool hideAlignment = false, @@ -1122,6 +1123,14 @@ class FleatherToolbar extends StatefulWidget implements PreferredSizeWidget { Visibility( visible: !hideLink, child: LinkStyleButton(controller: controller)), + Visibility( + visible: onImagePressed != null, + child: FLIconButton( + size: 32, + onPressed: onImagePressed, + icon: const Icon(Icons.image_outlined, size: 18), + ), + ), Visibility( visible: !hideHorizontalRule, child: InsertEmbedButton(