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 18:19:53 +02:00
|
|
|
import 'package:immich_mobile/extensions/build_context_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({
|
|
|
|
Key? key,
|
|
|
|
required this.title,
|
|
|
|
required this.subtitle,
|
|
|
|
required this.info,
|
|
|
|
}) : super(key: key);
|
2022-05-06 14:22:23 +02:00
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Card(
|
|
|
|
shape: RoundedRectangleBorder(
|
2023-02-13 07:05:31 +02:00
|
|
|
borderRadius: BorderRadius.circular(20), // if you need this
|
|
|
|
side: BorderSide(
|
2023-11-09 18:19:53 +02:00
|
|
|
color: context.isDarkTheme
|
2023-02-21 05:40:19 +02:00
|
|
|
? const Color.fromARGB(255, 56, 56, 56)
|
2023-02-13 07:05:31 +02:00
|
|
|
: Colors.black12,
|
2022-05-06 14:22:23 +02:00
|
|
|
width: 1,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
elevation: 0,
|
|
|
|
borderOnForeground: false,
|
|
|
|
child: ListTile(
|
2023-11-20 16:58:03 +02:00
|
|
|
minVerticalPadding: 18,
|
2022-05-06 14:22:23 +02:00
|
|
|
isThreeLine: true,
|
|
|
|
title: Text(
|
|
|
|
title,
|
2023-11-20 16:58:03 +02:00
|
|
|
style: context.textTheme.titleMedium,
|
2022-05-06 14:22:23 +02:00
|
|
|
),
|
|
|
|
subtitle: Padding(
|
2023-11-20 16:58:03 +02:00
|
|
|
padding: const EdgeInsets.only(top: 4.0, right: 18.0),
|
2022-05-06 14:22:23 +02:00
|
|
|
child: Text(
|
|
|
|
subtitle,
|
2023-11-20 16:58:03 +02:00
|
|
|
style: context.textTheme.bodyMedium,
|
2022-05-06 14:22:23 +02:00
|
|
|
),
|
|
|
|
),
|
|
|
|
trailing: Column(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
info,
|
2023-11-20 16:58:03 +02:00
|
|
|
style: context.textTheme.titleLarge,
|
2022-05-06 14:22:23 +02:00
|
|
|
),
|
2023-11-20 16:58:03 +02:00
|
|
|
Text(
|
|
|
|
"backup_info_card_assets",
|
|
|
|
style: context.textTheme.labelLarge,
|
|
|
|
).tr(),
|
2022-05-06 14:22:23 +02:00
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|