mirrored_repositories/wallpaper-flutter/lib
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:flutter/material.dart';
import 'package:wallpaper/image_list.dart';
import 'package:wallpaper/utils.dart';

class NewestPage extends StatelessWidget {
  final imagesCollection = Firestore.instance.collection('images');

  @override
  Widget build(BuildContext context) {
    return Container(
      color: Theme.of(context).backgroundColor,
      child: StaggeredImageList(
        imagesCollection
            .orderBy('uploadedTime', descending: true)
            .limit(15)
            .snapshots()
            .map(mapper),
      ),
    );
  }
}
