diff --git a/CHANGELOG.md b/CHANGELOG.md index 605f938..14f48c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## 1.0.1 +- Added support for network image at `ImageFile` class for initial selected images. +- Fixed error icon for `DefaultDraggableItemWidget`, Added file type based icon. +- Material 3: Color changes and UI improvements. +- Added Initial Images Example +- PR #31, #33, #34 merged (author:mauriziopinotti) which includes some of the changes mentioned above. + ## 1.0.0 - Major Update 🚀 - Inbuilt image picker is removed. You have to provide your own image/file picker logic. This will provide you more controls over image/file picking. You have to pass your `picker` in `MultiImagePickerController`. diff --git a/example/lib/custom/initial_images_custom_example.dart b/example/lib/custom/initial_images_custom_example.dart index 358acca..df6cf99 100644 --- a/example/lib/custom/initial_images_custom_example.dart +++ b/example/lib/custom/initial_images_custom_example.dart @@ -31,13 +31,6 @@ class _InitialImagesCustomExampleState path: "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf", ), - ImageFile( - UniqueKey().toString(), - name: "test-document.pdf", - extension: "pdf", - path: - "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf", - ), ], picker: (bool allowMultiple) { return pickImagesUsingImagePicker(allowMultiple); @@ -53,26 +46,6 @@ class _InitialImagesCustomExampleState body: MultiImagePickerView( controller: controller, padding: const EdgeInsets.all(10), - builder: (context, imageFile) { - return DefaultDraggableItemWidget( - imageFile: imageFile, - boxDecoration: - BoxDecoration(borderRadius: BorderRadius.circular(20)), - closeButtonAlignment: Alignment.topLeft, - fit: BoxFit.cover, - showCloseButton: true, - closeButtonMargin: const EdgeInsets.all(3), - closeButtonPadding: const EdgeInsets.all(3), - ); - }, - initialWidget: DefaultInitialWidget( - centerWidget: Icon(Icons.image_search_outlined, - color: Theme.of(context).colorScheme.secondary), - ), - addMoreButton: DefaultAddMoreWidget( - icon: Icon(Icons.image_search_outlined, - color: Theme.of(context).colorScheme.secondary), - ), ), ); } diff --git a/lib/src/image_file_view/error_preview.dart b/lib/src/image_file_view/error_preview.dart index 4184801..faeb9b7 100644 --- a/lib/src/image_file_view/error_preview.dart +++ b/lib/src/image_file_view/error_preview.dart @@ -11,8 +11,6 @@ class ErrorPreview extends StatelessWidget { @override Widget build(BuildContext context) { return Container( - color: - backgroundColor ?? Theme.of(context).colorScheme.secondaryContainer, alignment: Alignment.center, padding: const EdgeInsets.only(top: 8), child: Padding( diff --git a/lib/src/image_file_view/io_preview.dart b/lib/src/image_file_view/io_preview.dart index a6cc1ec..3478090 100644 --- a/lib/src/image_file_view/io_preview.dart +++ b/lib/src/image_file_view/io_preview.dart @@ -25,7 +25,7 @@ class ImageFileView extends StatelessWidget { return Container( clipBehavior: Clip.antiAlias, decoration: BoxDecoration( - color: backgroundColor ?? Theme.of(context).colorScheme.background, + color: backgroundColor ?? Theme.of(context).colorScheme.surfaceVariant, borderRadius: borderRadius ?? BorderRadius.zero, ), child: Uri.tryParse(imageFile.path!)?.scheme.startsWith('http') == true diff --git a/lib/src/image_file_view/web_preview.dart b/lib/src/image_file_view/web_preview.dart index 9f54a93..549ab84 100644 --- a/lib/src/image_file_view/web_preview.dart +++ b/lib/src/image_file_view/web_preview.dart @@ -23,7 +23,7 @@ class ImageFileView extends StatelessWidget { return Container( clipBehavior: Clip.antiAlias, decoration: BoxDecoration( - color: backgroundColor ?? Theme.of(context).colorScheme.background, + color: backgroundColor ?? Theme.of(context).colorScheme.surfaceVariant, borderRadius: borderRadius ?? BorderRadius.zero, ), child: imageFile.path == null diff --git a/pubspec.yaml b/pubspec.yaml index 0ea4359..d79a0b7 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: multi_image_picker_view description: A complete widget which can easily pick multiple images from device and display them in UI. Also picked image can be re-ordered and removed easily. -version: 1.0.0 +version: 1.0.1 homepage: https://github.com/shubham-gupta-16/multi_image_picker_view repository: https://github.com/shubham-gupta-16/multi_image_picker_view issue_tracker: https://github.com/shubham-gupta-16/multi_image_picker_view/issues