Skip to content

Commit af93414

Browse files
committed
fix analysis warnings
1 parent 7d99cfd commit af93414

File tree

5 files changed

+18
-6
lines changed

5 files changed

+18
-6
lines changed

cached_network_image/lib/src/image_provider/_image_loader.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import 'package:cached_network_image_platform_interface'
1212
'/cached_network_image_platform_interface.dart'
1313
show ImageRenderMethodForWeb;
1414

15+
/// ImageLoader class to load images on IO platforms.
1516
class ImageLoader implements platform.ImageLoader {
1617
@override
1718
Stream<ui.Codec> loadAsync(

cached_network_image/lib/src/image_provider/cached_network_image_provider.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ class CachedNetworkImageProvider
3636
this.imageRenderMethodForWeb = ImageRenderMethodForWeb.HtmlImage,
3737
});
3838

39+
/// CacheManager from which the image files are loaded.
3940
final BaseCacheManager? cacheManager;
4041

4142
/// Web url of the image to load
@@ -53,10 +54,15 @@ class CachedNetworkImageProvider
5354
/// Set headers for the image provider, for example for authentication
5455
final Map<String, String>? headers;
5556

57+
/// Maximum height of the loaded image. If not null and using an
58+
/// [ImageCacheManager] the image is resized on disk to fit the height.
5659
final int? maxHeight;
5760

61+
/// Maximum width of the loaded image. If not null and using an
62+
/// [ImageCacheManager] the image is resized on disk to fit the width.
5863
final int? maxWidth;
5964

65+
/// Render option for images on the web platform.
6066
final ImageRenderMethodForWeb imageRenderMethodForWeb;
6167

6268
@override

cached_network_image_platform_interface/lib/cached_network_image_platform_interface.dart

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,21 @@ import 'dart:ui' as ui;
66
import 'package:flutter/material.dart';
77
import 'package:flutter_cache_manager/flutter_cache_manager.dart';
88

9+
/// Render options for images on the web platform.
910
enum ImageRenderMethodForWeb {
1011
/// HtmlImage uses a default web image including default browser caching.
1112
/// This is the recommended and default choice.
12-
HtmlImage,
13+
HtmlImage, // ignore: constant_identifier_names
1314

1415
/// HttpGet uses an http client to fetch an image. It enables the use of
1516
/// headers, but loses some default web functionality.
16-
HttpGet,
17+
HttpGet, // ignore: constant_identifier_names
1718
}
1819

20+
/// ImageLoader class to load images differently on various platforms.
1921
class ImageLoader {
22+
/// loads the images async and gives the resulted codecs on a Stream. The
23+
/// Stream gives the option to show multiple images after each other.
2024
Stream<ui.Codec> loadAsync(
2125
String url,
2226
String? cacheKey,

cached_network_image_web/lib/cached_network_image_web.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,16 @@ import 'package:cached_network_image_platform_interface'
1212
import 'package:flutter/material.dart';
1313
import 'package:flutter_cache_manager/flutter_cache_manager.dart';
1414

15+
// ignore: avoid_web_libraries_in_flutter
1516
import 'dart:html' as html;
17+
// ignore: avoid_web_libraries_in_flutter
1618
import 'dart:js_util' as js_util;
1719
import 'dart:typed_data';
1820
import 'dart:ui' as skia;
1921

22+
/// ImageLoader class to load images on the web platform.
2023
class ImageLoader implements platform.ImageLoader {
24+
@override
2125
Stream<ui.Codec> loadAsync(
2226
String url,
2327
String? cacheKey,
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
import 'package:flutter_test/flutter_test.dart';
2-
3-
import 'package:cached_network_image_web/cached_network_image_web.dart';
4-
51
void main() {
2+
// missing tests :(
63
}

0 commit comments

Comments
 (0)