refactor(mobile): backup info box ()

split up backup info box into separate widgets
This commit is contained in:
Mert 2024-11-15 17:16:52 -05:00 committed by GitHub
parent 6729782c3f
commit caf6c0996d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 383 additions and 283 deletions
mobile/lib/widgets/backup

View file

@ -0,0 +1,28 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:immich_mobile/constants/immich_colors.dart';
import 'package:immich_mobile/providers/backup/error_backup_list.provider.dart';
class BackupErrorChipText extends ConsumerWidget {
const BackupErrorChipText({super.key});
@override
Widget build(BuildContext context, WidgetRef ref) {
final count = ref.watch(errorBackupListProvider).length;
if (count == 0) {
return const SizedBox();
}
return const Text(
"backup_controller_page_failed",
style: TextStyle(
color: red400,
fontWeight: FontWeight.bold,
fontSize: 11,
),
).tr(
args: [count.toString()],
);
}
}