2022-08-21 14:52:17 +02:00
|
|
|
import 'package:flutter/material.dart';
|
2022-09-02 15:35:25 +02:00
|
|
|
import 'package:flutter_i18n/flutter_i18n.dart';
|
2022-08-21 14:52:17 +02:00
|
|
|
|
2022-09-02 15:35:25 +02:00
|
|
|
class SettingsTileDialog extends StatelessWidget {
|
|
|
|
const SettingsTileDialog({
|
2022-08-21 14:52:17 +02:00
|
|
|
Key? key,
|
|
|
|
required this.title,
|
|
|
|
required this.subtitle,
|
2022-09-07 03:37:25 +02:00
|
|
|
required this.onTap,
|
2022-09-19 10:39:25 +02:00
|
|
|
this.padding,
|
2022-08-21 14:52:17 +02:00
|
|
|
}) : super(key: key);
|
2023-01-30 13:35:06 +01:00
|
|
|
final String title;
|
|
|
|
final String subtitle;
|
|
|
|
final Function()? onTap;
|
|
|
|
final EdgeInsetsGeometry? padding;
|
2022-08-21 14:52:17 +02:00
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return ListTile(
|
2022-09-19 10:39:25 +02:00
|
|
|
contentPadding: padding ?? EdgeInsets.zero,
|
2022-08-21 14:52:17 +02:00
|
|
|
title: I18nText(
|
|
|
|
title,
|
2022-09-05 04:32:36 +02:00
|
|
|
child: const Text(
|
2022-08-21 14:52:17 +02:00
|
|
|
'',
|
2022-09-05 04:32:36 +02:00
|
|
|
style: TextStyle(
|
|
|
|
fontSize: 20,
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
),
|
2022-08-21 14:52:17 +02:00
|
|
|
),
|
|
|
|
),
|
|
|
|
subtitle: I18nText(subtitle),
|
2022-09-07 03:37:25 +02:00
|
|
|
onTap: onTap,
|
2022-08-21 14:52:17 +02:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|