mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-09 17:39:42 +00:00
40 lines
1.2 KiB
Dart
40 lines
1.2 KiB
Dart
import 'package:easy_localization/easy_localization.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:selfprivacy/ui/atoms/cards/filled_card.dart';
|
|
|
|
class ServerOutdatedCard extends StatelessWidget {
|
|
const ServerOutdatedCard({
|
|
required this.requiredVersion,
|
|
required this.currentVersion,
|
|
super.key,
|
|
});
|
|
|
|
final String requiredVersion;
|
|
final String currentVersion;
|
|
|
|
@override
|
|
Widget build(final BuildContext context) => FilledCard(
|
|
error: true,
|
|
child: ListTile(
|
|
contentPadding:
|
|
const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
|
title: Text(
|
|
'basis.server_is_outdated'.tr(
|
|
namedArgs: {
|
|
'versionConstraint': requiredVersion,
|
|
'currentVersion': currentVersion,
|
|
},
|
|
),
|
|
style: Theme.of(context).textTheme.titleSmall?.copyWith(
|
|
color: Theme.of(context).colorScheme.onErrorContainer,
|
|
),
|
|
),
|
|
trailing: Icon(
|
|
Icons.error_outline,
|
|
size: 24,
|
|
color: Theme.of(context).colorScheme.onTertiaryContainer,
|
|
),
|
|
),
|
|
);
|
|
}
|