Skip to content

[flutter image] Changed image link to use image within package #5326

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 28, 2023
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
3 changes: 2 additions & 1 deletion packages/flutter_image/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## NEXT
## 4.1.10

* Fixes image asset link to use image within package.
* Updates minimum supported SDK version to Flutter 3.10/Dart 3.0.

## 4.1.9
Expand Down
8 changes: 4 additions & 4 deletions packages/flutter_image/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ class MyApp extends StatelessWidget {
const MyApp({super.key});

/// Returns the URL to load an asset from this example app as a network source.
// TODO(nitinpoojary): Change it to use an image within this package.
String getUrlFromAssetAsNetworkSource() {
return 'https://github.com/flutter/packages/blob/2e1673307ff7454aff40b47024eaed49a9e77e81/packages/flutter_markdown/example/assets/logo.png';
String getUrlForAssetAsNetworkSource(String assetKey) {
return 'https://github.com/flutter/packages/blob/b96a6dae0ca418cf1e91633f275866aa9cffe437/packages/flutter_image/example/$assetKey?raw=true';
}

@override
Widget build(BuildContext context) {
final String imageUrl = getUrlFromAssetAsNetworkSource();
final String imageUrl =
getUrlForAssetAsNetworkSource('assets/flutter-mark-square-64.png');

return MaterialApp(
title: 'flutter_image example app',
Expand Down
2 changes: 1 addition & 1 deletion packages/flutter_image/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: >
Image utilities for Flutter: improved network providers, effects, etc.
repository: https://github.com/flutter/packages/tree/main/packages/flutter_image
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+flutter_image%22
version: 4.1.9
version: 4.1.10

environment:
sdk: ">=3.0.0 <4.0.0"
Expand Down