dali 0.0.2

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 52

Dalí #

An image loading and caching library for flutter. Supports iOS and Android. Dali is focused on speed and memory efficiency. It saves different versions of the original image in the local storage and cache. Once the image is downloaded, Dalí also makes copies of the image in different sizes in order to minimize the amount of memory used.

Getting Started #

Initialize Dali the app using this code:

void main() {
  DaliImageCache.ensureInitialized()
    ..attachRootWidget(MyApp())
    ..scheduleWarmUpFrame();
}

Then you can load an image in a container:

Container(
  height: 200,
  width: 200,
  child: Dali(imageUrl: images[index]),
)

[0.0.1] - 16/12/2018

  • TODO: Describe initial release.

[0.0.2] - 19/12/2018

  • bug fixing

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  dali: ^0.0.2

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:dali/dali.dart';
  
Version Uploaded Documentation Archive
0.0.10 Jan 12, 2019 Go to the documentation of dali 0.0.10 Download dali 0.0.10 archive
0.0.9 Jan 12, 2019 Go to the documentation of dali 0.0.9 Download dali 0.0.9 archive
0.0.8 Jan 4, 2019 Go to the documentation of dali 0.0.8 Download dali 0.0.8 archive
0.0.7 Jan 1, 2019 Go to the documentation of dali 0.0.7 Download dali 0.0.7 archive
0.0.6 Dec 24, 2018 Go to the documentation of dali 0.0.6 Download dali 0.0.6 archive
0.0.5 Dec 24, 2018 Go to the documentation of dali 0.0.5 Download dali 0.0.5 archive
0.0.4 Dec 23, 2018 Go to the documentation of dali 0.0.4 Download dali 0.0.4 archive
0.0.3 Dec 23, 2018 Go to the documentation of dali 0.0.3 Download dali 0.0.3 archive
0.0.2 Dec 19, 2018 Go to the documentation of dali 0.0.2 Download dali 0.0.2 archive
0.0.1 Dec 17, 2018 Go to the documentation of dali 0.0.1 Download dali 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
62
Health:
Code health derived from static analysis. [more]
50
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
30
Overall:
Weighted score of the above. [more]
52
Learn more about scoring.

We analyzed this package on Feb 14, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.13
  • Flutter: 1.2.0

Platforms

Detected platforms:

Error(s) prevent platform classification:

Error(s) in lib/image_cache_impl.dart: 'ImageCacheImpl.putIfAbsent' ('(Object, () → ImageStreamCompleter) → ImageStreamCompleter') isn't a valid override of 'ImageCache.putIfAbsent' ('(Object, () → ImageStreamCompleter, {onError: (dynamic, StackTrace) → void}) → ImageStreamCompleter').

Health issues and suggestions

Fix lib/image_cache_impl.dart. (-25 points)

Analysis of lib/image_cache_impl.dart failed with 1 error:

line 34 col 3: 'ImageCacheImpl.putIfAbsent' ('(Object, () → ImageStreamCompleter) → ImageStreamCompleter') isn't a valid override of 'ImageCache.putIfAbsent' ('(Object, () → ImageStreamCompleter, {onError: (dynamic, StackTrace) → void}) → ImageStreamCompleter').

Format lib/cached_image.dart.

Run flutter format to format lib/cached_image.dart.

Format lib/cached_image_provider.dart.

Run flutter format to format lib/cached_image_provider.dart.

Fix additional 4 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/dali_cache_binding.dart (Run flutter format to format lib/dali_cache_binding.dart.)
  • lib/dali_cache_manager.dart (Run flutter format to format lib/dali_cache_manager.dart.)
  • lib/dali_cached_manager.dart (Run flutter format to format lib/dali_cached_manager.dart.)
  • lib/site.dart (Run flutter format to format lib/site.dart.)

Maintenance issues and suggestions

Fix platform conflicts. (-20 points)

Error(s) prevent platform classification:

Error(s) in lib/image_cache_impl.dart: 'ImageCacheImpl.putIfAbsent' ('(Object, () → ImageStreamCompleter) → ImageStreamCompleter') isn't a valid override of 'ImageCache.putIfAbsent' ('(Object, () → ImageStreamCompleter, {onError: (dynamic, StackTrace) → void}) → ImageStreamCompleter').

Make sure dartdoc successfully runs on your package's source files. (-10 points)

exitCode: 255 stdout: parsing /tmp/pub-dartlang-dartdocHQSRTE/pkg/lib/dali_cache_manager.dart... parsing /tmp/pub-dartlang-dartdocHQSRTE/pkg/lib/dali_cache_binding.dart... parsing /tmp/pub-dartlang-dartdocHQSRTE/pkg/lib/dali_cached_manager.dart... parsing /tmp/pub-dartlang-dartdocHQSRTE/pkg/lib/cached_image.dart... parsing /tmp/pub-dartlang-dartdocHQSRTE/pkg/lib/site.dart... parsing /tmp/pub-dartlang-dartdocHQSRTE/pkg/lib/cached_image_provider.dart... parsing /tmp/pub-dartlang-dartdocHQSRTE/pkg/lib/dali.dart... parsing /tmp/pub-dartlang-dartdocHQSRTE/pkg/lib/image_cache_impl.dart... parsing /flutter/bin/cache/pkg/sky_engine/lib/collection/collection.dart... parsing /flutter/bin/cache/pkg/sky_engine/lib/developer/developer.dart... parsing /flutter/bin/cache/pkg/sky_engine/lib/internal/internal.dart... parsing /flutter/bin/cache/pkg/sky_engine/lib/io/io.dart... parsing /flutter/bin/cache/pkg/sky_engine/lib/isolate/isolate.dart... parsing /flutter/bin/cache/pkg/sky_engine/lib/async/async.dart... parsing /flutter/bin/cache/pkg/sky_engine/lib/convert/convert.dart... parsing /flutter/bin/cache/pkg/sky_engine/lib/typed_data/typed_data.dart... parsing /flutter/bin/cache/pkg/sky_engine/lib/_empty.dart... parsing /flutter/bin/cache/pkg/sky_engine/lib/math/math.dart... parsing /flutter/bin/cache/pkg/sky_engine/lib/core/core.dart... parsing /flutter/bin/cache/pkg/sky_engine/lib/_http/http.dart... [...] parsing /tmp/pub-cache-dirYEFLMG/hosted/pub.dartlang.org/xml-3.3.1/lib/src/xml_events/codec/node_codec.dart... parsing /tmp/pub-cache-dirYEFLMG/hosted/pub.dartlang.org/xml-3.3.1/lib/src/xml_events/converters/node_decoder.dart... parsing /tmp/pub-cache-dirYEFLMG/hosted/pub.dartlang.org/xml-3.3.1/lib/src/xml_events/converters/node_encoder.dart... parsing /tmp/pub-cache-dirYEFLMG/hosted/pub.dartlang.org/xml-3.3.1/lib/src/xml_events/converters/normalizer.dart... parsing /tmp/pub-cache-dirYEFLMG/hosted/pub.dartlang.org/petitparser-2.1.1/lib/src/reflection/iterable.dart... parsing /tmp/pub-cache-dirYEFLMG/hosted/pub.dartlang.org/petitparser-2.1.1/lib/src/reflection/optimize.dart... parsing /tmp/pub-cache-dirYEFLMG/hosted/pub.dartlang.org/petitparser-2.1.1/lib/src/reflection/transform.dart... parsing /tmp/pub-cache-dirYEFLMG/hosted/pub.dartlang.org/petitparser-2.1.1/lib/src/debug/continuation.dart... parsing /tmp/pub-cache-dirYEFLMG/hosted/pub.dartlang.org/petitparser-2.1.1/lib/src/debug/profile.dart... parsing /tmp/pub-cache-dirYEFLMG/hosted/pub.dartlang.org/petitparser-2.1.1/lib/src/debug/output.dart... parsing /tmp/pub-cache-dirYEFLMG/hosted/pub.dartlang.org/petitparser-2.1.1/lib/src/debug/progress.dart... parsing /tmp/pub-cache-dirYEFLMG/hosted/pub.dartlang.org/petitparser-2.1.1/lib/src/debug/trace.dart... Initialized dartdoc with 798 libraries in 206.7 seconds documenting dali Generating docs for library cached_image from package:dali/cached_image.dart... Generating docs for library cached_image_provider from package:dali/cached_image_provider.dart... Generating docs for library dali from package:dali/dali.dart... Generating docs for library dali_cache_binding from package:dali/dali_cache_binding.dart... Generating docs for library dali_cache_manager from package:dali/dali_cache_manager.dart... Generating docs for library dali_cached_manager from package:dali/dali_cached_manager.dart... stderr: Documenting dali... warning: cached_image has no library level documentation comments, from cached_image: (file:///tmp/pub-dartlang-dartdocHQSRTE/pkg/lib/cached_image.dart:1:8) warning: unresolved doc reference [CachedNetworkImage], from cached_image.ImagePhase: (file:///tmp/pub-dartlang-dartdocHQSRTE/pkg/lib/cached_image.dart:142:6) warning: unresolved doc reference [AlignmentGeometry] from cached_image.CachedImage.alignment: (file:///tmp/pub-dartlang-dartdocHQSRTE/pkg/lib/cached_image.dart:111:27) in documentation inherited from cached_image.CachedImage.alignment: (file:///tmp/pub-dartlang-dartdocHQSRTE/pkg/lib/cached_image.dart:111:27) warning: dali has no library level documentation comments, from dali: (file:///tmp/pub-dartlang-dartdocHQSRTE/pkg/lib/dali.dart:1:8) warning: unresolved doc reference [testWidgets] from dali_cache_binding.DaliCacheBinding.ensureInitialized: (file:///tmp/pub-dartlang-dartdocHQSRTE/pkg/lib/dali_cache_binding.dart:13:25) in documentation inherited from binding.WidgetsFlutterBinding.ensureInitialized: (file:///flutter/packages/flutter/lib/src/widgets/binding.dart:977:25) warning: unresolved doc reference [TestWidgetsFlutterBinding] from dali_cache_binding.DaliCacheBinding.ensureInitialized: (file:///tmp/pub-dartlang-dartdocHQSRTE/pkg/lib/dali_cache_binding.dart:13:25) in documentation inherited from binding.WidgetsFlutterBinding.ensureInitialized: (file:///flutter/packages/flutter/lib/src/widgets/binding.dart:977:25) Unhandled exception: RangeError (start): Invalid value: Only valid value is 0: 1 #0 _StringBase.indexOf (dart:core/runtime/libstring_patch.dart:334:7) #1 String.indexOf (dart:core/runtime/libstring_patch.dart:1024:18) #2 _createLineNumbersMap (package:dartdoc/src/line_number_cache.dart:30:23) #3 LineNumberCache.lineAndColumn.<anonymous closure> (package:dartdoc/src/line_number_cache.dart:47:21) #4 __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.putIfAbsent (dart:collection/runtime/libcompact_hash.dart:281:23) #5 LineNumberCache.lineAndColumn (package:dartdoc/src/line_number_cache.dart:46:32) #6 ModelElement.lineAndColumn (package:dartdoc/src/model.dart:3499:40) #7 new SourceLinker.fromElement (package:dartdoc/src/source_linker.dart:88:27) #8 ModelElement.sourceHref (package:dartdoc/src/model.dart:3222:25) #9 ModelElement.hasSourceHref (package:dartdoc/src/model.dart:3219:29) #10 _LocalInstanceMirror._invokeGetter (dart:mirrors/runtime/libmirrors_impl.dart:329:76) #11 _LocalInstanceMirror.getField (dart:mirrors/runtime/libmirrors_impl.dart:296:20) #12 Renderer._getNamedProperty (package:mustache/src/renderer.dart:245:29) #13 Renderer.resolveValue (package:mustache/src/renderer.dart:212:16) #14 Renderer._renderSection (package:mustache/src/renderer.dart:120:17) #15 Renderer.visitSection (package:mustache/src/renderer.dart:115:7) #16 SectionNode.accept (package:mustache/src/node.dart:63:43) #17 Renderer.render.<anonymous closure> (package:mustache/src/renderer.dart:58:30) #18 List.forEach (dart:core/runtime/libgrowable_array.dart:277:8) #19 Renderer.render (package:mustache/src/renderer.dart:58:13) #20 Renderer.visitPartial (package:mustache/src/renderer.dart:195:16) #21 PartialNode.accept (package:mustache/src/node.dart:81:43) #22 SectionNode.visitChildren.<anonymous closure> (package:mustache/src/node.dart:66:37) #23 List.forEach (dart:core/runtime/libgrowable_array.dart:277:8) #24 SectionNode.visitChildren (package:mustache/src/node.dart:66:14) #25 Renderer._renderWithValue (package:mustache/src/renderer.dart:184:10) #26 Renderer._renderSection (package:mustache/src/renderer.dart:144:7) #27 Renderer.visitSection (package:mustache/src/renderer.dart:115:7) #28 SectionNode.accept (package:mustache/src/node.dart:63:43) #29 Renderer.render.<anonymous closure> (package:mustache/src/renderer.dart:58:30) #30 List.forEach (dart:core/runtime/libgrowable_array.dart:277:8) #31 Renderer.render (package:mustache/src/renderer.dart:58:13) #32 Template.render (package:mustache/src/template.dart:40:14) #33 Template.renderString (package:mustache/src/template.dart:33:5) #34 HtmlGeneratorInstance._build (package:dartdoc/src/html/html_generator_instance.dart:381:31) #35 HtmlGeneratorInstance.generateLibrary (package:dartdoc/src/html/html_generator_instance.dart:269:5) #36 HtmlGeneratorInstance._generateDocs (package:dartdoc/src/html/html_generator_instance.dart:131:9) #37 HtmlGeneratorInstance.generate (package:dartdoc/src/html/html_generator_instance.dart:36:7) <asynchronous suspension> #38 HtmlGenerator.generate (package:dartdoc/src/html/html_generator.dart:108:23) <asynchronous suspension> #39 Dartdoc.generateDocsBase (package:dartdoc/dartdoc.dart:107:25) <asynchronous suspension> #40 Dartdoc.generateDocs (package:dartdoc/dartdoc.dart:134:43) <asynchronous suspension> #41 main (file:///project/pkg/pub_dartdoc/bin/pub_dartdoc.dart:27:17) <asynchronous suspension> #42 _startIsolate.<anonymous closure> (dart:isolate/runtime/libisolate_patch.dart:287:32) #43 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and dali.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
flutter 0.0.0
image ^2.0.4 2.0.7
path_provider ^0.4.1 0.4.1 0.5.0+1
Transitive dependencies
archive 2.0.8
args 1.5.1
charcode 1.1.2
collection 1.14.11
convert 2.1.1
crypto 2.0.6
meta 1.1.6 1.1.7
path 1.6.2
petitparser 2.1.1
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
xml 3.3.1
Dev dependencies
flutter_test