adguard-home-manager/lib/screens/settings/encryption/config_error_modal.dart

35 lines
847 B
Dart
Raw Normal View History

import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
class EncryptionErrorModal extends StatelessWidget {
final String error;
const EncryptionErrorModal({
Key? key,
required this.error,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return AlertDialog(
2022-11-05 01:09:09 +01:00
title: Text(
AppLocalizations.of(context)!.configError,
style: TextStyle(
color: Theme.of(context).colorScheme.onSurface
),
),
content: Text(
error,
style: TextStyle(
color: Theme.of(context).colorScheme.onSurfaceVariant
),
),
actions: [
TextButton(
onPressed: () => Navigator.pop(context),
child: Text(AppLocalizations.of(context)!.close)
)
],
);
}
}