2023-05-13 18:33:09 +02:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
|
|
|
|
|
|
|
class VersionWarningModal extends StatelessWidget {
|
|
|
|
final String version;
|
|
|
|
|
|
|
|
const VersionWarningModal({
|
2024-09-11 18:13:26 +02:00
|
|
|
super.key,
|
2023-05-13 18:33:09 +02:00
|
|
|
required this.version,
|
2024-09-11 18:13:26 +02:00
|
|
|
});
|
2023-05-13 18:33:09 +02:00
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return AlertDialog(
|
|
|
|
scrollable: true,
|
|
|
|
title: Column(
|
|
|
|
children: [
|
|
|
|
Icon(
|
|
|
|
Icons.warning_rounded,
|
|
|
|
size: 24,
|
|
|
|
color: Theme.of(context).listTileTheme.iconColor
|
|
|
|
),
|
|
|
|
const SizedBox(height: 16),
|
|
|
|
Text(
|
|
|
|
AppLocalizations.of(context)!.unsupportedVersion,
|
|
|
|
style: TextStyle(
|
|
|
|
color: Theme.of(context).colorScheme.onSurface
|
|
|
|
),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
content: Text(AppLocalizations.of(context)!.unsupprtedVersionMessage(version)),
|
|
|
|
actions: [
|
|
|
|
Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
|
|
children: [
|
|
|
|
TextButton(
|
|
|
|
onPressed: () => Navigator.pop(context),
|
|
|
|
child: Text(AppLocalizations.of(context)!.iUnderstand)
|
|
|
|
)
|
|
|
|
],
|
|
|
|
)
|
|
|
|
],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|