firebase_storage_image 0.2.1

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 87

firebase_storage_image #

pub package

Flutter's ImageProvider for images in Firebase Cloud Storage.

Getting Started #

FirebaseStorageImage implements ImageProvider. So you can use this directly for Image, CircleAvatar, ImageIcon, and something like that.

Example #

import 'package:flutter/material.dart';
import 'package:firebase_storage_image/firebase_storage_image.dart';

class YourCircleAvatar extends StatelessWidget {
  @override
  Widget build(BuildContext context) => const CircleAvatar(
        backgroundImage: FirebaseStorageImage(
          'gs://project-12345.appspot.com/path/to/avatar_image.png',
        ),
      );
}

License #

MIT

Contribution #

I need your help improving this package with leaving Pull Requests and Issues!

[0.2.0] - 2018-12-23

  • Breaking changes
    • Add a new option of constructor: firebaseApp
    • Change type of the first argument from Uri to String

[0.1.0] - 2018-12-23

  • Breaking changes
    • Make the FirebaseStorageImage‚Äôs default constructor const
    • Change default allocated size from 2MB to 1MB

[0.0.4] - 2018-12-23

  • Correcting pubspec.yaml

[0.0.3] - 2018-12-23

  • Added document to code.

[0.0.2] - 2018-12-23

  • Only correcting pubspec.yaml

[0.0.1] - 2018-12-23

  • Initial release, should be polished. I want your help with an issue!

example/example.dart

import 'package:flutter/material.dart';
import 'package:firebase_storage_image/firebase_storage_image.dart';

class YourImage extends StatelessWidget {
  @override
  Widget build(BuildContext context) => const Image(
        image: FirebaseStorageImage(
          'gs://project-12345.appspot.com/path/to/image.png',
        ),
      );
}

class YourCircleAvatar extends StatelessWidget {
  @override
  Widget build(BuildContext context) => const CircleAvatar(
        backgroundImage: FirebaseStorageImage(
          'gs://project-12345.appspot.com/path/to/avatar_image.png',
        ),
      );
}

class YourImageIcon extends StatelessWidget {
  @override
  Widget build(BuildContext context) => const ImageIcon(
        FirebaseStorageImage(
          'gs://project-12345.appspot.com/path/to/icon_image.png',
        ),
      );
}

Use this package as a library

1. Depend on it

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


dependencies:
  firebase_storage_image: ^0.2.1

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter packages get

Alternatively, your editor might support 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:firebase_storage_image/firebase_storage_image.dart';
  
Version Uploaded Documentation Archive
0.2.1 Jan 1, 2019 Go to the documentation of firebase_storage_image 0.2.1 Download firebase_storage_image 0.2.1 archive
0.2.0 Dec 24, 2018 Go to the documentation of firebase_storage_image 0.2.0 Download firebase_storage_image 0.2.0 archive
0.1.0 Dec 23, 2018 Go to the documentation of firebase_storage_image 0.1.0 Download firebase_storage_image 0.1.0 archive
0.0.4 Dec 23, 2018 Go to the documentation of firebase_storage_image 0.0.4 Download firebase_storage_image 0.0.4 archive
0.0.3 Dec 23, 2018 Go to the documentation of firebase_storage_image 0.0.3 Download firebase_storage_image 0.0.3 archive
0.0.2 Dec 23, 2018 Go to the documentation of firebase_storage_image 0.0.2 Download firebase_storage_image 0.0.2 archive
0.0.1 Dec 23, 2018 Go to the documentation of firebase_storage_image 0.0.1 Download firebase_storage_image 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
75
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
87
Learn more about scoring.

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

  • Dart: 2.2.0
  • pana: 0.12.14
  • Flutter: 1.4.7

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Fix lib/firebase_storage_image.dart. (-1 points)

Analysis of lib/firebase_storage_image.dart reported 2 hints:

line 50 col 3: The class 'Future' was not exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.

line 82 col 3: The class 'Future' was not exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
firebase_core ^0.2.5+1 0.2.5+1 0.3.4
firebase_storage ^1.0.4 1.1.0+1 2.1.0+1
flutter 0.0.0
Transitive dependencies
collection 1.14.11
meta 1.1.6 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test