firebase_image 0.1.4 copy "firebase_image: ^0.1.4" to clipboard
firebase_image: ^0.1.4 copied to clipboard

outdated

A cached Flutter ImageProvider for Firebase Cloud Storage image objects.

example/main.dart

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

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Firebase Image Provider Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(title: 'Firebase Image Provider example'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Image(
        image: FirebaseImage(
          'gs://bucket123/userIcon123.jpg',
          shouldCache: true, // The image should be cached (default: True)
          maxSizeBytes: 3000 * 1000, // 3MB max file size (default: 2.5MB)
        ),
        width: 100,
      ),
    );
  }
}
136
likes
0
pub points
68%
popularity

Publisher

verified publishermattreid.dev

A cached Flutter ImageProvider for Firebase Cloud Storage image objects.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

firebase_core, firebase_storage, flutter, path, path_provider, sqflite

More

Packages that depend on firebase_image