Skip to content

Commit

Permalink
Merge pull request #46 from smocken78/master
Browse files Browse the repository at this point in the history
IO Preview
  • Loading branch information
shubham16g authored Dec 1, 2024
2 parents 880a713 + e629b65 commit 0abb566
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 19 deletions.
14 changes: 7 additions & 7 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -302,7 +302,7 @@ packages:
path: ".."
relative: true
source: path
version: "1.1.0"
version: "1.1.4"
path:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ dev_dependencies:
flutter_test:
sdk: flutter

flutter_lints: ^2.0.0
flutter_lints: ^4.0.0


flutter:
Expand Down
22 changes: 14 additions & 8 deletions lib/src/image_file_view/io_preview.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
),
Expand Down
7 changes: 4 additions & 3 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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:
flutter:

0 comments on commit 0abb566

Please sign in to comment.