backup_info_card.dart 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. import 'package:easy_localization/easy_localization.dart';
  2. import 'package:flutter/material.dart';
  3. import 'package:immich_mobile/extensions/build_context_extensions.dart';
  4. class BackupInfoCard extends StatelessWidget {
  5. final String title;
  6. final String subtitle;
  7. final String info;
  8. const BackupInfoCard({
  9. Key? key,
  10. required this.title,
  11. required this.subtitle,
  12. required this.info,
  13. }) : super(key: key);
  14. @override
  15. Widget build(BuildContext context) {
  16. return Card(
  17. shape: RoundedRectangleBorder(
  18. borderRadius: BorderRadius.circular(20), // if you need this
  19. side: BorderSide(
  20. color: context.isDarkTheme
  21. ? const Color.fromARGB(255, 56, 56, 56)
  22. : Colors.black12,
  23. width: 1,
  24. ),
  25. ),
  26. elevation: 0,
  27. borderOnForeground: false,
  28. child: ListTile(
  29. minVerticalPadding: 18,
  30. isThreeLine: true,
  31. title: Text(
  32. title,
  33. style: context.textTheme.titleMedium,
  34. ),
  35. subtitle: Padding(
  36. padding: const EdgeInsets.only(top: 4.0, right: 18.0),
  37. child: Text(
  38. subtitle,
  39. style: context.textTheme.bodyMedium,
  40. ),
  41. ),
  42. trailing: Column(
  43. mainAxisAlignment: MainAxisAlignment.center,
  44. children: [
  45. Text(
  46. info,
  47. style: context.textTheme.titleLarge,
  48. ),
  49. Text(
  50. "backup_info_card_assets",
  51. style: context.textTheme.labelLarge,
  52. ).tr(),
  53. ],
  54. ),
  55. ),
  56. );
  57. }
  58. }