file_info_collection_widget.dart 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import 'package:flutter/material.dart';
  2. import 'package:photos/ente_theme_data.dart';
  3. class FileInfoCollection extends StatelessWidget {
  4. final String name;
  5. final Function onTap;
  6. const FileInfoCollection({this.name, this.onTap, Key key}) : super(key: key);
  7. @override
  8. Widget build(BuildContext context) {
  9. return GestureDetector(
  10. onTap: onTap,
  11. child: Container(
  12. margin: const EdgeInsets.only(
  13. top: 10,
  14. bottom: 18,
  15. right: 8,
  16. ),
  17. decoration: BoxDecoration(
  18. color: Theme.of(context)
  19. .colorScheme
  20. .inverseBackgroundColor
  21. .withOpacity(0.025),
  22. borderRadius: const BorderRadius.all(
  23. Radius.circular(8),
  24. ),
  25. ),
  26. child: Center(
  27. child: Padding(
  28. padding: const EdgeInsets.symmetric(horizontal: 8),
  29. child: Text(
  30. name,
  31. style: Theme.of(context).textTheme.subtitle2,
  32. overflow: TextOverflow.ellipsis,
  33. ),
  34. ),
  35. ),
  36. ),
  37. );
  38. }
  39. }