mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2024-09-06 12:06:57 +00:00
30 lines
868 B
Dart
30 lines
868 B
Dart
import 'package:easy_localization/easy_localization.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:selfprivacy/config/get_it_config.dart';
|
|
import 'package:selfprivacy/utils/platform_adapter.dart';
|
|
|
|
class SnapshotIdListTile extends StatelessWidget {
|
|
const SnapshotIdListTile({
|
|
required this.snapshotId,
|
|
super.key,
|
|
});
|
|
|
|
final String snapshotId;
|
|
|
|
@override
|
|
Widget build(final BuildContext context) => ListTile(
|
|
onLongPress: () {
|
|
PlatformAdapter.setClipboard(snapshotId);
|
|
getIt<NavigationService>().showSnackBar(
|
|
'basis.copied_to_clipboard'.tr(),
|
|
);
|
|
},
|
|
leading: Icon(
|
|
Icons.numbers_outlined,
|
|
color: Theme.of(context).colorScheme.onSurface,
|
|
),
|
|
title: Text('backup.snapshot_id_title'.tr()),
|
|
subtitle: Text(snapshotId),
|
|
);
|
|
}
|