@@ -137,7 +137,7 @@ class _MyHomePageState extends State<MyHomePage> {
137
137
child: Text (
138
138
isActive
139
139
? "Talk something or type"
140
- : " Failed to connect. check ' Base URL'" ,
140
+ : ' Failed to connect. check " Base URL"' ,
141
141
style: TextStyle (
142
142
color: tertiaryColor,
143
143
),
@@ -329,7 +329,7 @@ class _MyHomePageState extends State<MyHomePage> {
329
329
),
330
330
child: TextButton (
331
331
onPressed: () {
332
- _showOptionsDialog (context, tertiaryColor);
332
+ _showOptionsDialog (context, secondaryColor, tertiaryColor);
333
333
},
334
334
child: Text (
335
335
langs[selectedId]! ,
@@ -476,28 +476,44 @@ class _MyHomePageState extends State<MyHomePage> {
476
476
}
477
477
478
478
Future <void > _showOptionsDialog (
479
- BuildContext context, Color tertiaryColor) async {
479
+ BuildContext context, Color secondaryColor, Color tertiaryColor) async {
480
480
String ? selectedOption = await showDialog (
481
481
context: context,
482
482
builder: (BuildContext context) {
483
483
return AlertDialog (
484
484
scrollable: true ,
485
- titleTextStyle: TextStyle (
486
- fontWeight: FontWeight .bold,
487
- color: tertiaryColor,
488
- fontSize: 24 ,
485
+ title: ListTile (
486
+ title: const Text ('Select a language' ),
487
+ isThreeLine: true ,
488
+ contentPadding: const EdgeInsets .symmetric (vertical: 8 ),
489
+ minVerticalPadding: 0 ,
490
+ titleTextStyle: TextStyle (
491
+ fontWeight: FontWeight .bold,
492
+ color: secondaryColor,
493
+ fontSize: 24 ,
494
+ ),
495
+ subtitle: const Text (
496
+ "You need to have the language pack installed for the selected language." ,
497
+ ),
498
+ subtitleTextStyle: TextStyle (
499
+ fontStyle: FontStyle .italic,
500
+ color: tertiaryColor,
501
+ fontSize: 14 ,
502
+ ),
489
503
),
490
- title: const Text ('Select a language' ),
491
- content: SingleChildScrollView (
492
- child: ListBody (
493
- children: langs.keys.map ((String key) {
494
- return ListTile (
495
- title: Text (langs[key]! ),
496
- onTap: () {
497
- Navigator .of (context).pop (key);
498
- },
499
- );
500
- }).toList (),
504
+ content: Container (
505
+ constraints: const BoxConstraints (maxHeight: 400 ),
506
+ child: SingleChildScrollView (
507
+ child: ListBody (
508
+ children: langs.keys.map ((String key) {
509
+ return ListTile (
510
+ title: Text (langs[key]! ),
511
+ onTap: () {
512
+ Navigator .of (context).pop (key);
513
+ },
514
+ );
515
+ }).toList (),
516
+ ),
501
517
),
502
518
),
503
519
);
0 commit comments