Nenhuma descrição

preview.dart 699B

123456789101112131415161718192021222324252627282930
  1. import 'package:flutter/material.dart';
  2. import 'package:photo_manager/photo_manager.dart';
  3. import './asset_image.dart';
  4. class PreviewPage extends StatelessWidget {
  5. final List<AssetEntity> list;
  6. const PreviewPage({Key key, this.list = const []}) : super(key: key);
  7. @override
  8. Widget build(BuildContext context) {
  9. return Scaffold(
  10. appBar: AppBar(
  11. title: Text("Preview"),
  12. ),
  13. body: ListView(
  14. children: list
  15. .map((item) => AssetImageWidget(
  16. assetEntity: item,
  17. width: 300,
  18. height: 200,
  19. boxFit: BoxFit.cover,
  20. ))
  21. .toList(),
  22. ),
  23. );
  24. }
  25. }