loading_gifs 0.2.2

  • Readme
  • Changelog
  • Example
  • Installing
  • 88

Loading GIFs Cover

Loading GIFs #

Pub release GitHub Release Date GitHub issues GitHub top language GitHub code size in bytes Libraries.io for GitHub License

High quality Android and iOS loading spinners. #

View Demo

Loading GIFs is a collection of high fidelity loading animations in GIF format. Included are Android "Material Design" and iOS "Cupertino" default loading indicators.

Usage #

Pub release

Import this library into your project:

loading_gifs: ^latest_version

Use cupertinoActivityIndicator or circularProgressIndicator where ever a loading image is needed.

FadeInImage.assetNetwork(placeholder: cupertinoActivityIndicator, image: "image.png");

That's it!

Usage Tips #

Loading GIFs Sizes

Size #

This library is optimized for size so it only includes the base asset sizes. Change the size of the loading spinners using scale and placeholderScale.

FadeInImage.assetNetwork(placeholder: cupertinoActivityIndicator, image: "image.png", placeholderScale: 5);

Image.asset(circularProgressIndicator, scale: 10);

Dynamic Images #

When loading images whose dimensions are unknown ahead of time, use cupertinoActivityIndicatorSmall instead of cupertinoActivityIndicator. cupertinoActivityIndicatorSmall is a min height variant of cupertinoActivityIndicator which allows Flutter to correctly expand the loaded image into the layout.

The small variant should be used when loading a list of images or compositing an image from multiple images.

  ListView(
    children: <Widget>[
      FadeInImage.assetNetwork(
          placeholder: cupertinoActivityIndicatorSmall,
          image: "image_1.png"),
      FadeInImage.assetNetwork(
          placeholder: cupertinoActivityIndicatorSmall,
          image: "image_2.png"),
      FadeInImage.assetNetwork(
          placeholder: cupertinoActivityIndicatorSmall,
          image: "image_3.png"),
    ],
  )

Empty Placeholder #

FadeInImage requires a valid placeholder image to avoid "Asset not found" errors. Use placeholderEmpty, a 1x1 pixel transparent PNG, when an empty placeholder is needed.

FadeInImage.assetNetwork(placeholder: placeholderEmpty, image: "image.png");

Assets #

iOS (Cupertino) Loading Indicators #

|--|--| |Full (159KB)|Optimized (78KB)|

|--|--|--| |Large Square (36KB)|Medium Square (14KB)|Small Square (7KB)|

|--|--|--| |Large (16KB)|Medium (16KB)|Small (16KB)|

Android (Material) Loading Indicators #

|--|--| |Full (1.13MB)|Optimized (263KB)|

|--|--|--| |Large Square (225KB)|Medium Square (148KB)|Small Square (100KB)|

|--|--|--| |Large (129KB)|Medium (149KB)|Small (186KB)|

About #

Here at Codelessly, we're working on #NoCode and code generation automation tools to increase productivity. If that sounds interesting, you'll want to subscribe to updates below 😎

Loading GIFs is licensed under Zero-Clause BSD and released as Emailware. If you like this project or it helped you, please subscribe to updates. Although it is not required, you might miss the goodies we share!

Codelessly Newsletter Signup

Contributors ❤️ #

Design:

Development:

Sponsor: Codelessly - No Code Automation Tools

Codelessly Email Codelessly Website Codelessly Twitter Codelessly GitHub

Flutter Logo Banner

License #

BSD Zero Clause License

Copyright © 2020 Codelessly

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.

Changelog #

0.2.2 #

  • Create 1x1 pixel empty placeholder image.

0.2.1 #

  • Update ReadMe images and links.

0.2.0 #

  • Min Height Loading Variants.
  • Optimize Loading Assets.

0.1.1 #

  • Document API Methods.

0.1.0 #

  • Initial Release.

0.0.1 #

  • Initial Prerelease.

example/EXAMPLE.md

Loading GIFs Example #

Use cupertinoActivityIndicator or circularProgressIndicator where ever a loading GIF is needed.

FadeInImage.assetNetwork(placeholder: cupertinoActivityIndicator, image: "image.png", placeholderScale: 5);

Image.asset(circularProgressIndicator, scale: 10);

Use this package as a library

1. Depend on it

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


dependencies:
  loading_gifs: ^0.2.2

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

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

3. Import it

Now in your Dart code, you can use:


import 'package:loading_gifs/loading_gifs.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
75
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
88
Learn more about scoring.

We analyzed this package on Jul 11, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.14
  • Flutter: 1.17.5

Analysis suggestions

Package not compatible with SDK dart

Because:

  • loading_gifs that is a package requiring null.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.4.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.12 1.14.13
meta 1.1.8 1.2.2
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8 2.1.0-nullsafety
Dev dependencies
flutter_test