-
-
Notifications
You must be signed in to change notification settings - Fork 47
/
info_dialog.dart
33 lines (30 loc) · 917 Bytes
/
info_dialog.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import 'package:flutter/material.dart';
import 'package:genshindb/generated/l10n.dart';
import 'package:genshindb/presentation/shared/bullet_list.dart';
import 'package:genshindb/presentation/shared/extensions/media_query_extensions.dart';
class InfoDialog extends StatelessWidget {
final List<String> explanations;
const InfoDialog({
Key? key,
required this.explanations,
}) : super(key: key);
@override
Widget build(BuildContext context) {
final s = S.of(context);
return AlertDialog(
title: Text(s.information),
content: SingleChildScrollView(
child: SizedBox(
width: MediaQuery.of(context).getWidthForDialogs(),
child: BulletList(items: explanations, fontSize: 14),
),
),
actions: [
ElevatedButton(
onPressed: () => Navigator.of(context).pop(),
child: Text(s.ok),
)
],
);
}
}