Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ class MyHomePage extends StatelessWidget {
previewAutoSizeWidth: true,
previewMargin: const EdgeInsetsDirectional.only(end: 8),
fit: BoxFit.cover,
optionsClipBehavior: Clip.hardEdge,
initialValue: [
'https://images.pexels.com/photos/7078045/pexels-photo-7078045.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260',
const Text('this is an image\nas a widget !'),
Expand Down
4 changes: 4 additions & 0 deletions lib/src/form_builder_image_picker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ class FormBuilderImagePicker extends FormBuilderFieldDecoration<List<dynamic>> {

final WidgetBuilder? loadingWidget;

final Clip? optionsClipBehavior;

FormBuilderImagePicker({
super.key,
required super.name,
Expand Down Expand Up @@ -169,6 +171,7 @@ class FormBuilderImagePicker extends FormBuilderFieldDecoration<List<dynamic>> {
this.placeholderImage,
this.onTap,
this.optionsBuilder,
this.optionsClipBehavior,
this.availableImageSources = const [
ImageSourceOption.camera,
ImageSourceOption.gallery,
Expand Down Expand Up @@ -238,6 +241,7 @@ class FormBuilderImagePicker extends FormBuilderFieldDecoration<List<dynamic>> {
? onTap(imageSourceSheet)
: await showModalBottomSheet<void>(
context: state.context,
clipBehavior: optionsClipBehavior,
builder: (_) {
return imageSourceSheet;
},
Expand Down