diff --git a/example/pubspec.lock b/example/pubspec.lock index 40fcf73..1984f37 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -122,10 +122,10 @@ packages: dependency: "direct dev" description: name: flutter_lints - sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04 + sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c" url: "https://pub.dev" source: hosted - version: "2.0.3" + version: "4.0.0" flutter_plugin_android_lifecycle: dependency: transitive description: @@ -138,10 +138,10 @@ packages: dependency: transitive description: name: flutter_reorderable_grid_view - sha256: "40abcc5bff228ebff119326502e7357ee6399956b60b80b17385e9770b7458c0" + sha256: c51453b0054b1b305062944fa078b1b20a77ec961bfdcba7cfc5768ffc16ac64 url: "https://pub.dev" source: hosted - version: "5.0.1" + version: "5.2.0" flutter_test: dependency: "direct dev" description: flutter @@ -260,10 +260,10 @@ packages: dependency: transitive description: name: lints - sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" + sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "4.0.0" matcher: dependency: transitive description: @@ -302,7 +302,7 @@ packages: path: ".." relative: true source: path - version: "1.1.0" + version: "1.1.4" path: dependency: transitive description: diff --git a/example/pubspec.yaml b/example/pubspec.yaml index b57927f..e9645ed 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -21,7 +21,7 @@ dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^2.0.0 + flutter_lints: ^4.0.0 flutter: diff --git a/lib/src/image_file_view/io_preview.dart b/lib/src/image_file_view/io_preview.dart index a308102..d2057cf 100644 --- a/lib/src/image_file_view/io_preview.dart +++ b/lib/src/image_file_view/io_preview.dart @@ -28,14 +28,20 @@ class ImageFileView extends StatelessWidget { color: backgroundColor ?? Theme.of(context).colorScheme.surface, borderRadius: borderRadius ?? BorderRadius.zero, ), - child: Uri.tryParse(imageFile.path!)?.scheme.startsWith('http') == true - ? Image.network( - imageFile.path!, - fit: fit, - errorBuilder: errorBuilder ?? _defaultErrorBuilder, - ) - : Image.file( - File(imageFile.path!), + child: imageFile.path != null + ? Uri.tryParse(imageFile.path!)?.scheme.startsWith('http') == true + ? Image.network( + imageFile.path!, + fit: fit, + errorBuilder: errorBuilder ?? _defaultErrorBuilder, + ) + : Image.file( + File(imageFile.path!), + fit: fit, + errorBuilder: errorBuilder ?? _defaultErrorBuilder, + ) + : Image.memory( + imageFile.bytes!, fit: fit, errorBuilder: errorBuilder ?? _defaultErrorBuilder, ), diff --git a/pubspec.yaml b/pubspec.yaml index c0d84dc..5596296 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,21 +1,22 @@ 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.1.0 +version: 1.1.4 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 environment: - sdk: '>=2.18.6 <4.0.0' + sdk: '>=3.4.0 <4.0.0' dependencies: flutter: sdk: flutter + flutter_reorderable_grid_view: 5.3.2 dev_dependencies: flutter_test: sdk: flutter flutter_lints: ^4.0.0 -flutter: \ No newline at end of file +flutter: