diff --git a/packages/based_local_first_image/CHANGELOG.md b/packages/based_local_first_image/CHANGELOG.md index e495a58..72fea97 100644 --- a/packages/based_local_first_image/CHANGELOG.md +++ b/packages/based_local_first_image/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.1.0 + +⚠️Rename `BasedLocalFirstImage().fileName` to `BasedLocalFirstImage().filename` + ## 1.0.0 🌞First commit diff --git a/packages/based_local_first_image/README.md b/packages/based_local_first_image/README.md index 49d8ad5..f79e159 100644 --- a/packages/based_local_first_image/README.md +++ b/packages/based_local_first_image/README.md @@ -26,7 +26,7 @@ Welcome to the world of local-first web development. ```dart Image( image: BasedLocalFirstImage( - fileName: '$index.png', + filename: '$index.png', localDirectory: path.join(appSupport.path, 'image'), remoteUrl: 'https://avatars.githubusercontent.com/u/$index?v=4', ), diff --git a/packages/based_local_first_image/lib/src/based_local_first_image.dart b/packages/based_local_first_image/lib/src/based_local_first_image.dart index 80c741d..d53f3da 100644 --- a/packages/based_local_first_image/lib/src/based_local_first_image.dart +++ b/packages/based_local_first_image/lib/src/based_local_first_image.dart @@ -9,14 +9,14 @@ import 'package:flutter/foundation.dart'; @immutable class BasedLocalFirstImage extends ImageProvider { const BasedLocalFirstImage({ - required this.fileName, + required this.filename, required this.localDirectory, this.scale = 1.0, this.remoteUrl, this.headers, }); - final String fileName; + final String filename; final String localDirectory; final double scale; final String? remoteUrl; @@ -70,7 +70,7 @@ class BasedLocalFirstImage extends ImageProvider { assert(key == this); try { - final filePath = path.join(key.localDirectory, key.fileName); + final filePath = path.join(key.localDirectory, key.filename); final file = File(filePath); if (file.existsSync()) { @@ -79,7 +79,7 @@ class BasedLocalFirstImage extends ImageProvider { if (key.remoteUrl == null) { throw Exception( - 'remoteUrl is null, can not download $fileName from network', + 'remoteUrl is null, can not download $filename from network', ); } @@ -131,15 +131,15 @@ class BasedLocalFirstImage extends ImageProvider { @override bool operator ==(Object other) { if (other is! BasedLocalFirstImage) return false; - return fileName == other.fileName && + return filename == other.filename && localDirectory == other.localDirectory && remoteUrl == other.remoteUrl; } @override - int get hashCode => Object.hash(fileName, localDirectory, remoteUrl); + int get hashCode => Object.hash(filename, localDirectory, remoteUrl); @override String toString() => - 'BasedLocalFirstImageProvider(fileName: "$fileName", localDirectory:"$localDirectory")'; + 'BasedLocalFirstImageProvider(filename: "$filename", localDirectory:"$localDirectory")'; } diff --git a/packages/based_local_first_image/pubspec.yaml b/packages/based_local_first_image/pubspec.yaml index 701e1d8..f80b618 100644 --- a/packages/based_local_first_image/pubspec.yaml +++ b/packages/based_local_first_image/pubspec.yaml @@ -1,6 +1,6 @@ name: based_local_first_image description: A Based Widget For Building More Useful Avatar -version: 1.0.0 +version: 1.1.0 homepage: https://github.com/Cierra-Runis/based_widget/tree/master/packages/based_avatar environment: