-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
728 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"path_provider_ios","path":"/Users/dawood/.pub-cache/hosted/pub.dartlang.org/path_provider_ios-2.0.7/","dependencies":[]},{"name":"sqflite","path":"/Users/dawood/.pub-cache/hosted/pub.dartlang.org/sqflite-2.0.2/","dependencies":[]}],"android":[{"name":"path_provider_android","path":"/Users/dawood/.pub-cache/hosted/pub.dartlang.org/path_provider_android-2.0.11/","dependencies":[]},{"name":"sqflite","path":"/Users/dawood/.pub-cache/hosted/pub.dartlang.org/sqflite-2.0.2/","dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"/Users/dawood/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-2.0.5/","dependencies":[]},{"name":"sqflite","path":"/Users/dawood/.pub-cache/hosted/pub.dartlang.org/sqflite-2.0.2/","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/Users/dawood/.pub-cache/hosted/pub.dartlang.org/path_provider_linux-2.1.5/","dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"/Users/dawood/.pub-cache/hosted/pub.dartlang.org/path_provider_windows-2.0.5/","dependencies":[]}],"web":[]},"dependencyGraph":[{"name":"path_provider","dependencies":["path_provider_android","path_provider_ios","path_provider_linux","path_provider_macos","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_ios","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"sqflite","dependencies":[]}],"date_created":"2022-04-11 01:36:51.047638","version":"2.10.4"} | ||
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"path_provider_ios","path":"/Users/dawood/.pub-cache/hosted/pub.dartlang.org/path_provider_ios-2.0.7/","dependencies":[]},{"name":"sqflite","path":"/Users/dawood/.pub-cache/hosted/pub.dartlang.org/sqflite-2.0.2/","dependencies":[]}],"android":[{"name":"path_provider_android","path":"/Users/dawood/.pub-cache/hosted/pub.dartlang.org/path_provider_android-2.0.11/","dependencies":[]},{"name":"sqflite","path":"/Users/dawood/.pub-cache/hosted/pub.dartlang.org/sqflite-2.0.2/","dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"/Users/dawood/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-2.0.5/","dependencies":[]},{"name":"sqflite","path":"/Users/dawood/.pub-cache/hosted/pub.dartlang.org/sqflite-2.0.2/","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/Users/dawood/.pub-cache/hosted/pub.dartlang.org/path_provider_linux-2.1.5/","dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"/Users/dawood/.pub-cache/hosted/pub.dartlang.org/path_provider_windows-2.0.5/","dependencies":[]}],"web":[]},"dependencyGraph":[{"name":"path_provider","dependencies":["path_provider_android","path_provider_ios","path_provider_linux","path_provider_macos","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_ios","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"sqflite","dependencies":[]}],"date_created":"2022-04-18 01:02:40.493601","version":"2.10.4"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,69 @@ | ||
<!-- | ||
This README describes the package. If you publish this package to pub.dev, | ||
this README's contents appear on the landing page for your package. | ||
# wrapper for cached network image but with additional features | ||
|
||
For information about how to write a good package README, see the guide for | ||
[writing package pages](https://dart.dev/guides/libraries/writing-package-pages). | ||
# how to use | ||
|
||
For general information about developing packages, see the Dart guide for | ||
[creating packages](https://dart.dev/guides/libraries/create-library-packages) | ||
and the Flutter guide for | ||
[developing packages and plugins](https://flutter.dev/developing-packages). | ||
--> | ||
|
||
TODO: Put a short description of the package here that helps potential users | ||
know whether this package might be useful for them. | ||
```dart | ||
/// only the path property is required | ||
ReadyImage( | ||
path: //url or just file name as the there is a global url resolver that can handle the url, | ||
height: /// image height, | ||
width: /// image width | ||
queryParameters: /// query parameters to be added to the url, | ||
resolveUrl: /// url resolver to override the global one, | ||
imageRenderMethodForWeb: /// how web images can be handled, | ||
errorPlaceholder: /// widget in case of error, | ||
loadingPlaceholder: /// widget while loading, | ||
foregroundDecoration: /// decoration to be applied above the image, | ||
decoration: /// decoration behind the image, | ||
outerDecoration:/// decoration behind the image and its decoration , | ||
outerPadding: /// the padding between the outer decoration and the image decoration, | ||
innerPadding: /// padding between the image and its decoration, | ||
fit: /// , | ||
headers:/// headers to be passed , | ||
cacheManager:/// image cacheManager , | ||
forceForegroundRadiusSameAsBackground: /// if true will override the foreground border radius to be the sme as background, | ||
), | ||
``` | ||
|
||
## Features | ||
### You can also configure these properties globally so that all images in your app can have the same shape | ||
|
||
TODO: List what your package can do. Maybe include images, gifs, or videos. | ||
```dart | ||
/// all of these properties are optional | ||
ReadyImageConfig( | ||
resolveUrl: (context, path) => Uri.parse('http://someurl/$path'), | ||
imageRenderMethodForWeb: , | ||
errorPlaceholder: , | ||
loadingPlaceholder: , | ||
foregroundDecoration: , | ||
decoration: , | ||
outerDecoration: , | ||
outerPadding: EdgeInsetsDirectional.only(start: 20), | ||
innerPadding: , | ||
fit: , | ||
headers: , | ||
cacheManager: , | ||
forceForegroundRadiusSameAsBackground: , | ||
child: MaterialApp(), | ||
) | ||
``` | ||
|
||
## Getting started | ||
### this alow has its own hero image which animate all of its decoration while navigating from one screen to other | ||
|
||
TODO: List prerequisites and provide or point to information on how to | ||
start using the package. | ||
```dart | ||
HeroReadyImage(path:///) | ||
``` | ||
|
||
## Usage | ||
### in some cases you may need to create an image provider not the image it self like in container background | ||
|
||
TODO: Include short and useful examples for package users. Add longer examples | ||
to `/example` folder. | ||
this will allow to make benefit of global configuration | ||
|
||
```dart | ||
const like = 'sample'; | ||
``` | ||
Container( | ||
decoration: BoxDecoration(image: context.readyImageDecoration(path: 'path')), | ||
); | ||
## Additional information | ||
|
||
TODO: Tell users more about the package: where to find more information, how to | ||
contribute to the package, how to file issues, what response they can expect | ||
from the package authors, and more. | ||
CircleAvatar( | ||
backgroundImage: context.readyImageProvider(path: 'path'), | ||
); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# This is a generated file; do not edit or check into version control. | ||
path_provider=/Users/dawood/.pub-cache/hosted/pub.dartlang.org/path_provider-2.0.9/ | ||
path_provider_android=/Users/dawood/.pub-cache/hosted/pub.dartlang.org/path_provider_android-2.0.12/ | ||
path_provider_ios=/Users/dawood/.pub-cache/hosted/pub.dartlang.org/path_provider_ios-2.0.8/ | ||
path_provider_linux=/Users/dawood/.pub-cache/hosted/pub.dartlang.org/path_provider_linux-2.1.5/ | ||
path_provider_macos=/Users/dawood/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-2.0.5/ | ||
path_provider_windows=/Users/dawood/.pub-cache/hosted/pub.dartlang.org/path_provider_windows-2.0.5/ | ||
sqflite=/Users/dawood/.pub-cache/hosted/pub.dartlang.org/sqflite-2.0.2+1/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"path_provider_ios","path":"/Users/dawood/.pub-cache/hosted/pub.dartlang.org/path_provider_ios-2.0.8/","dependencies":[]},{"name":"sqflite","path":"/Users/dawood/.pub-cache/hosted/pub.dartlang.org/sqflite-2.0.2+1/","dependencies":[]}],"android":[{"name":"path_provider_android","path":"/Users/dawood/.pub-cache/hosted/pub.dartlang.org/path_provider_android-2.0.12/","dependencies":[]},{"name":"sqflite","path":"/Users/dawood/.pub-cache/hosted/pub.dartlang.org/sqflite-2.0.2+1/","dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"/Users/dawood/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-2.0.5/","dependencies":[]},{"name":"sqflite","path":"/Users/dawood/.pub-cache/hosted/pub.dartlang.org/sqflite-2.0.2+1/","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/Users/dawood/.pub-cache/hosted/pub.dartlang.org/path_provider_linux-2.1.5/","dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"/Users/dawood/.pub-cache/hosted/pub.dartlang.org/path_provider_windows-2.0.5/","dependencies":[]}],"web":[]},"dependencyGraph":[{"name":"path_provider","dependencies":["path_provider_android","path_provider_ios","path_provider_linux","path_provider_macos","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_ios","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"sqflite","dependencies":[]}],"date_created":"2022-04-18 01:33:47.171319","version":"2.10.4"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# This file tracks properties of this Flutter project. | ||
# Used by Flutter tool to assess capabilities and perform upgrades etc. | ||
# | ||
# This file should be version controlled and should not be manually edited. | ||
|
||
version: | ||
revision: c860cba910319332564e1e9d470a17074c1f2dfd | ||
channel: stable | ||
|
||
project_type: app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# example | ||
|
||
A new Flutter project. | ||
|
||
## Getting Started | ||
|
||
This project is a starting point for a Flutter application. | ||
|
||
A few resources to get you started if this is your first Flutter project: | ||
|
||
- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) | ||
- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) | ||
|
||
For help getting started with Flutter, view our | ||
[online documentation](https://flutter.dev/docs), which offers tutorials, | ||
samples, guidance on mobile development, and a full API reference. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# This file configures the analyzer, which statically analyzes Dart code to | ||
# check for errors, warnings, and lints. | ||
# | ||
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled | ||
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be | ||
# invoked from the command line by running `flutter analyze`. | ||
|
||
# The following line activates a set of recommended lints for Flutter apps, | ||
# packages, and plugins designed to encourage good coding practices. | ||
include: package:flutter_lints/flutter.yaml | ||
|
||
linter: | ||
# The lint rules applied to this project can be customized in the | ||
# section below to disable rules from the `package:flutter_lints/flutter.yaml` | ||
# included above or to enable additional rules. A list of all available lints | ||
# and their documentation is published at | ||
# https://dart-lang.github.io/linter/lints/index.html. | ||
# | ||
# Instead of disabling a lint rule for the entire project in the | ||
# section below, it can also be suppressed for a single line of code | ||
# or a specific dart file by using the `// ignore: name_of_lint` and | ||
# `// ignore_for_file: name_of_lint` syntax on the line or in the file | ||
# producing the lint. | ||
rules: | ||
# avoid_print: false # Uncomment to disable the `avoid_print` rule | ||
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule | ||
|
||
# Additional information about this file can be found at | ||
# https://dart.dev/guides/language/analysis-options |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:ready_image/config.dart'; | ||
import 'package:ready_image/ready_image.dart'; | ||
|
||
void main() { | ||
runApp(const MyApp()); | ||
} | ||
|
||
class MyApp extends StatelessWidget { | ||
const MyApp({Key? key}) : super(key: key); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return ReadyImageConfig( | ||
resolveUrl: (context, path) { | ||
return Uri.parse('http://site.com/$path'); | ||
}, | ||
child: MaterialApp( | ||
title: 'Flutter Demo', | ||
theme: ThemeData( | ||
primarySwatch: Colors.blue, | ||
), | ||
home: const MyHomePage(), | ||
), | ||
); | ||
} | ||
} | ||
|
||
class MyHomePage extends StatelessWidget { | ||
const MyHomePage({Key? key}) : super(key: key); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return const ReadyImage(path: 'image_1/.png'); | ||
} | ||
} |
Oops, something went wrong.