2022-10-08 23:57:10 +02:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
|
|
|
|
|
|
|
class DnsAddressesModal extends StatelessWidget {
|
|
|
|
final List<String> dnsAddresses;
|
|
|
|
|
|
|
|
const DnsAddressesModal({
|
|
|
|
Key? key,
|
|
|
|
required this.dnsAddresses,
|
|
|
|
}) : super(key: key);
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return AlertDialog(
|
|
|
|
title: Column(
|
|
|
|
children: [
|
|
|
|
const Icon(Icons.route_rounded),
|
|
|
|
const SizedBox(height: 20),
|
|
|
|
Text(AppLocalizations.of(context)!.dnsAddresses)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
content: SizedBox(
|
|
|
|
height: dnsAddresses.length*56 < 500
|
|
|
|
? dnsAddresses.length*56 : 500,
|
|
|
|
width: double.minPositive,
|
|
|
|
child: ListView(
|
|
|
|
children: dnsAddresses.map((address) => ListTile(
|
2022-10-21 02:06:53 +02:00
|
|
|
title: Text(
|
|
|
|
address,
|
|
|
|
style: const TextStyle(
|
|
|
|
fontWeight: FontWeight.normal
|
|
|
|
),
|
|
|
|
),
|
2022-10-08 23:57:10 +02:00
|
|
|
)).toList(),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
actions: [
|
|
|
|
TextButton(
|
|
|
|
onPressed: () => Navigator.pop(context),
|
|
|
|
child: Text(AppLocalizations.of(context)!.close)
|
|
|
|
)
|
|
|
|
],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|