mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-19 08:36:17 +08:00
feat: loudnorm (#1358)
* feat: loudnorm * fix * fix: android only * fix: toString
This commit is contained in:
committed by
GitHub
parent
046412b709
commit
22c57bf468
@@ -16,6 +16,7 @@ class SelectDialog<T> extends StatelessWidget {
|
||||
final String title;
|
||||
final List<(T, String)> values;
|
||||
final Widget Function(BuildContext, int)? subtitleBuilder;
|
||||
final bool toggleable;
|
||||
|
||||
const SelectDialog({
|
||||
super.key,
|
||||
@@ -23,11 +24,12 @@ class SelectDialog<T> extends StatelessWidget {
|
||||
required this.values,
|
||||
required this.title,
|
||||
this.subtitleBuilder,
|
||||
this.toggleable = false,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final titleMedium = Theme.of(context).textTheme.titleMedium!;
|
||||
final titleMedium = TextTheme.of(context).titleMedium!;
|
||||
return AlertDialog(
|
||||
clipBehavior: Clip.hardEdge,
|
||||
title: Text(title),
|
||||
@@ -37,7 +39,7 @@ class SelectDialog<T> extends StatelessWidget {
|
||||
contentPadding: const EdgeInsets.symmetric(vertical: 12),
|
||||
content: SingleChildScrollView(
|
||||
child: RadioGroup<T>(
|
||||
onChanged: Navigator.of(context).pop,
|
||||
onChanged: (v) => Navigator.of(context).pop(v ?? value),
|
||||
groupValue: value,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
@@ -46,6 +48,7 @@ class SelectDialog<T> extends StatelessWidget {
|
||||
(index) {
|
||||
final item = values[index];
|
||||
return RadioListTile<T>(
|
||||
toggleable: toggleable,
|
||||
dense: true,
|
||||
value: item.$1,
|
||||
title: Text(
|
||||
|
||||
Reference in New Issue
Block a user