Skip to content

Commit 37bbeb1

Browse files
committed
## 3.4.2 * Fix issue that cannot compile ExtendedImage.file on the web (566#)
1 parent 5847a6a commit 37bbeb1

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 3.4.2
2+
3+
* Fix issue that cannot compile ExtendedImage.file on the web (566#)
4+
15
## 3.4.1
26

37
* clearMemoryCacheWhenDispose is not working with imageCacheName property, obtainCacheStatus method should be overrided.(#44)

lib/src/_platform_web.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import 'package:flutter/widgets.dart';
55
/// mock web File
66
/// no implement
77
// ignore_for_file: always_specify_types,avoid_unused_constructor_parameters,unused_field
8-
abstract class File {
8+
class File {
99
/// Creates a [File] object.
1010
///
1111
/// If [path] is a relative path, it will be interpreted relative to the
@@ -15,16 +15,16 @@ abstract class File {
1515
/// current working directory.
1616
///
1717
18-
File(String path) : assert(false, 'not support on web');
18+
File(this.path) : assert(false, 'not support on web');
1919

2020
/// Reads the entire file contents as a list of bytes.
2121
///
2222
/// Returns a `Future<Uint8List>` that completes with the list of bytes that
2323
/// is the contents of the file.
24-
Future<Uint8List> readAsBytes();
24+
Future<Uint8List> readAsBytes() async => Uint8List.fromList(<int>[]);
2525

2626
/// The path of the file underlying this random access file.
27-
String get path;
27+
final String path;
2828
}
2929

3030
/// mock web File

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: extended_image_library
22
description: package library for extended_image, extended_text and extended_text_field, provide common base class.
3-
version: 3.4.1
3+
version: 3.4.2
44
homepage: https://github.com/fluttercandies/extended_image_library
55

66
environment:

0 commit comments

Comments
 (0)