2022-07-07 20:40:54 +02:00
|
|
|
import 'package:easy_localization/easy_localization.dart';
|
2022-05-06 14:22:23 +02:00
|
|
|
import 'package:flutter/material.dart';
|
2023-11-09 17:19:53 +01:00
|
|
|
import 'package:immich_mobile/extensions/build_context_extensions.dart';
|
2024-08-06 16:20:27 +02:00
|
|
|
import 'package:immich_mobile/extensions/theme_extensions.dart';
|
2022-05-06 14:22:23 +02:00
|
|
|
|
|
|
|
class BackupInfoCard extends StatelessWidget {
|
|
|
|
final String title;
|
|
|
|
final String subtitle;
|
|
|
|
final String info;
|
2022-07-13 14:23:48 +02:00
|
|
|
const BackupInfoCard({
|
2024-01-27 17:14:32 +01:00
|
|
|
super.key,
|
2022-07-13 14:23:48 +02:00
|
|
|
required this.title,
|
|
|
|
required this.subtitle,
|
|
|
|
required this.info,
|
2024-01-27 17:14:32 +01:00
|
|
|
});
|
2022-05-06 14:22:23 +02:00
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Card(
|
|
|
|
shape: RoundedRectangleBorder(
|
2023-02-13 06:05:31 +01:00
|
|
|
borderRadius: BorderRadius.circular(20), // if you need this
|
|
|
|
side: BorderSide(
|
2024-08-06 16:20:27 +02:00
|
|
|
color: context.colorScheme.outlineVariant,
|
2022-05-06 14:22:23 +02:00
|
|
|
width: 1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
elevation: 0,
|
|
|
|
borderOnForeground: false,
|
|
|
|
child: ListTile(
|
2023-11-20 15:58:03 +01:00
|
|
|
minVerticalPadding: 18,
|
2022-05-06 14:22:23 +02:00
|
|
|
isThreeLine: true,
|
|
|
|
title: Text(
|
|
|
|
title,
|
2023-11-20 15:58:03 +01:00
|
|
|
style: context.textTheme.titleMedium,
|
2022-05-06 14:22:23 +02:00
|
|
|
),
|
|
|
|
subtitle: Padding(
|
2023-11-20 15:58:03 +01:00
|
|
|
padding: const EdgeInsets.only(top: 4.0, right: 18.0),
|
2022-05-06 14:22:23 +02:00
|
|
|
child: Text(
|
|
|
|
subtitle,
|
2024-08-06 16:20:27 +02:00
|
|
|
style: context.textTheme.bodyMedium?.copyWith(
|
|
|
|
color: context.colorScheme.onSurfaceSecondary,
|
|
|
|
),
|
2022-05-06 14:22:23 +02:00
|
|
|
),
|
|
|
|
),
|
|
|
|
trailing: Column(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
info,
|
2023-11-20 15:58:03 +01:00
|
|
|
style: context.textTheme.titleLarge,
|
2022-05-06 14:22:23 +02:00
|
|
|
),
|
2023-11-20 15:58:03 +01:00
|
|
|
Text(
|
|
|
|
"backup_info_card_assets",
|
|
|
|
style: context.textTheme.labelLarge,
|
|
|
|
).tr(),
|
2022-05-06 14:22:23 +02:00
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|