flutter_widget_gallery 0.1.2+1

  • README.md
  • Installing
  • Versions
  • 71


Widget Gallery Viewer.

It's a gallery, where you can pass all the children you'd like to show. It includes a bottom drawer to show the list of the children that are visible.

Implementation heavily relies on Flutter Gallery Demo / Gridview and Fluttery Cards


1. Edit your pubspec.yaml file:

  flutter_widget_gallery: ^0.1.2

2. Install the packages

3. Import the Gallery Widget

import 'package:flutter/material.dart';
import 'package:flutter_widget_gallery/gallery/gallery.dart';

class PhotoViewer extends StatelessWidget {
  final List<Widget> pictures;

  const PhotoViewer({Key key, this.pictures}) : super(key: key);
  Widget build(BuildContext context) {
    return Scaffold(
      body: Gallery(
        children: pictures,
        activeItemColor: Theme.of(context).primaryColor,
        carouselBackgroundColor: Color(0xCCEAEAEA),
        carouselBackgroundItemColor: Color(0xFF000000),
        onChildTap: (index) => print('tapped on $index'),
        onChildLongPress: (index) => print('long press on $index'),

Example 2

import 'package:flutter/material.dart';

import 'gallery/gallery.dart';

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

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  Widget build(BuildContext context) {
    return new MaterialApp(
      title: 'Flutter Demo',
      theme: new ThemeData(
        // This is the theme of your application.
        // Try running your application with "flutter run". You'll see the
        // application has a blue toolbar. Then, without quitting the app, try
        // changing the primarySwatch below to Colors.green and then invoke
        // "hot reload" (press "r" in the console where you ran "flutter run",
        // or press Run > Flutter Hot Reload in IntelliJ). Notice that the
        // counter didn't reset back to zero; the application is not restarted.
        primarySwatch: Colors.blue,
      home: new MyHomePage(),

class MyHomePage extends StatelessWidget {
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        elevation: 0.0,
      body: Gallery(
        activeItemColor: Color(0xFF6A0AEA),
        backgroundColor: Color(0xFFF3F3F3),
        carouselBackgroundColor: Color(0xAAE3E3E3),
        children: List.generate<Widget>(
          (index) => Image.network(
                fit: BoxFit.cover,
        onChildTap: (index) => print('tapped on $index'),
        onChildLongPress: (index) => print('long press on $index'),


  • Migrated repo to GitHub
  • Updated README on root
  • Added a more clear example of how to use it


  • Added carouselItemBackground color


  • Updated file names to comply with Dart naming standards (only letters, underscores, etc.)


  • Initial Release

Use this package as a library

1. Depend on it

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

  flutter_widget_gallery: ^0.1.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:flutter_widget_gallery/gallery/gallery.dart';
import 'package:flutter_widget_gallery/gallery/widgets/thumbnail_item.dart';
import 'package:flutter_widget_gallery/gallery/widgets/thumbnails_carousel.dart';
import 'package:flutter_widget_gallery/gallery/widgets/thumbnails_drawer.dart';
import 'package:flutter_widget_gallery/gallery/widgets/viewer.dart';
import 'package:flutter_widget_gallery/gallery/widgets/viewer_child.dart';
import 'package:flutter_widget_gallery/gallery/widgets/widgets.dart';
import 'package:flutter_widget_gallery/main.dart';
Version Uploaded Documentation Archive
0.1.2+1 Jul 27, 2018 Go to the documentation of flutter_widget_gallery 0.1.2+1 Download flutter_widget_gallery 0.1.2+1 archive
0.1.2 Jul 23, 2018 Go to the documentation of flutter_widget_gallery 0.1.2 Download flutter_widget_gallery 0.1.2 archive
0.1.1 Jul 23, 2018 Go to the documentation of flutter_widget_gallery 0.1.1 Download flutter_widget_gallery 0.1.1 archive
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Dec 10, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.7
  • Flutter: 1.0.0


Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health issues and suggestions

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

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

line 40 col 32: The constructor 'List.generate' does not have type parameters.

Maintenance issues and suggestions

Running dartdoc failed. (-10 points)

Make sure dartdoc runs without any issues.

The description is too short. (-20 points)

Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use flutter_widget_gallery.dart.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.20.1 <3.0.0
cupertino_icons ^0.1.2 0.1.2
flutter 0.0.0
Transitive dependencies
collection 1.14.11
meta 1.1.6
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies