Skip to content

Commit 1b5a369

Browse files
Merge pull request #348 from stuartmorgan/import-flutter-image
[flutter_image] Import from flutter/flutter_image
2 parents 4800be5 + 1f5a1c3 commit 1b5a369

16 files changed

+876
-1
lines changed

.cirrus.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ task:
3939
depends_on:
4040
- format+analyze
4141
- name: test
42-
script: ./script/tool_runner.sh test
42+
# Exclude flutter_image; its tests need a test server, so are run via local_tests.sh
43+
script: ./script/tool_runner.sh test --exclude=flutter_image
4344
depends_on:
4445
- format+analyze
4546
- name: build-apks+java-test

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ These are the available packages in this repository.
3737
| [css\_colors](./packages/css_colors/) | [![pub package](https://img.shields.io/pub/v/css_colors.svg)](https://pub.dev/packages/css_colors) |
3838
| [extension\_google\_sign\_in\_as\_googleapis\_auth](./packages/extension_google_sign_in_as_googleapis_auth/) | [![pub package](https://img.shields.io/pub/v/extension_google_sign_in_as_googleapis_auth.svg)](https://pub.dev/packages/extension_google_sign_in_as_googleapis_auth) |
3939
| [fuchsia\_ctl](./packages/fuchsia_ctl/) | [![pub package](https://img.shields.io/pub/v/fuchsia_ctl.svg)](https://pub.dev/packages/fuchsia_ctl) |
40+
| [flutter\_image](./packages/flutter_image/) | [![pub package](https://img.shields.io/pub/v/flutter_image.svg)](https://pub.dev/packages/flutter_image) |
4041
| [flutter\_lints](./packages/flutter_lints/) | [![pub package](https://img.shields.io/pub/v/flutter_lints.svg)](https://pub.dev/packages/flutter_lints) |
4142
| [flutter\_markdown](./packages/flutter_markdown/) | [![pub package](https://img.shields.io/pub/v/flutter_markdown.svg)](https://pub.dev/packages/flutter_markdown) |
4243
| [multicast\_dns](./packages/multicast_dns/) | [![pub package](https://img.shields.io/pub/v/multicast_dns.svg)](https://pub.dev/packages/multicast_dns) |

packages/flutter_image/.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.buildlog
2+
.DS_Store
3+
.idea/libraries/*
4+
.idea/vcs.xml
5+
.idea/workspace.xml
6+
.pub/
7+
.settings/
8+
build/
9+
packages
10+
.packages
11+
pubspec.lock

packages/flutter_image/.idea/flutter_image.iml

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/flutter_image/.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/flutter_image/.travis.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
os:
2+
- linux
3+
sudo: false
4+
5+
addons:
6+
apt:
7+
# Flutter depends on /usr/lib/x86_64-linux-gnu/libstdc++.so.6 version GLIBCXX_3.4.18
8+
sources:
9+
- ubuntu-toolchain-r-test # if we don't specify this, the libstdc++6 we get is the wrong version
10+
packages:
11+
- libstdc++6
12+
- fonts-droid-fallback
13+
14+
before_script:
15+
- git clone https://github.com/flutter/flutter.git -b master
16+
- export PATH=$PATH:$(pwd)/flutter/bin
17+
- export FLUTTER_HOME=$(pwd)/flutter
18+
- flutter doctor
19+
20+
script: ./tool/travis.sh
21+
22+
cache:
23+
directories:
24+
- $HOME/.pub-cache

packages/flutter_image/AUTHORS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Below is a list of people and organizations that have contributed
2+
# to the project. Names should be added to the list like so:
3+
#
4+
# Name/Organization <email address>
5+
6+
Google Inc.

packages/flutter_image/CHANGELOG.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
## 4.0.1
2+
3+
- Moved source to flutter/packages
4+
5+
## 4.0.0
6+
7+
- Migrates to null safety
8+
- **Breaking change**: `NetworkImageWithRetry.load` now throws a `FetchFailure` if the fetched image data is zero bytes.
9+
10+
## 3.0.0
11+
12+
* **Breaking change**. Updates for Flutter 1.10.15.
13+
14+
## 2.0.1
15+
16+
- Update Flutter SDK version constraint.
17+
18+
## 2.0.0
19+
20+
* **Breaking change**. Updates for Flutter 1.5.9.
21+
22+
## 1.0.0
23+
24+
* **Breaking change**. SDK constraints to support Flutter beta versions and Dart 2 only.
25+
26+
## 0.0.3
27+
28+
- Moved `flutter_test` to dev_dependencies in `pubspec.yaml`, and fixed issues
29+
flagged by the analyzer.
30+
31+
## 0.0.2
32+
33+
- Add `NetworkImageWithRetry`, an `ImageProvider` with a retry mechanism.
34+
35+
## 0.0.1
36+
37+
- Contains no useful code.

packages/flutter_image/LICENSE

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Copyright 2013 The Flutter Authors. All rights reserved.
2+
3+
Redistribution and use in source and binary forms, with or without modification,
4+
are permitted provided that the following conditions are met:
5+
6+
* Redistributions of source code must retain the above copyright
7+
notice, this list of conditions and the following disclaimer.
8+
* Redistributions in binary form must reproduce the above
9+
copyright notice, this list of conditions and the following
10+
disclaimer in the documentation and/or other materials provided
11+
with the distribution.
12+
* Neither the name of Google Inc. nor the names of its
13+
contributors may be used to endorse or promote products derived
14+
from this software without specific prior written permission.
15+
16+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
20+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
23+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

packages/flutter_image/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Image utilities for Flutter
2+
3+
## NetworkImageWithRetry
4+
5+
Use `NetworkImageWithRetry` instead of `Image.network` to load images from the
6+
network with a retry mechanism.
7+
8+
Example:
9+
10+
```dart
11+
var avatar = new Image(
12+
image: new NetworkImageWithRetry('http://example.com/avatars/123.jpg'),
13+
);
14+
```
15+
16+
The retry mechanism may be customized by supplying a custom `FetchStrategy`
17+
function. `FetchStrategyBuilder` is a utility class that helps building fetch
18+
strategy functions.
19+
20+
## Features and bugs
21+
22+
Please file feature requests and bugs at https://github.com/flutter/flutter/issues.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// Copyright 2013 The Flutter Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
export 'network.dart';

0 commit comments

Comments
 (0)