file_info_collection_widget.dart 1.1 KB

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