mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-04-22 14:59:12 +00:00
69 lines
No EOL
1.9 KiB
Dart
69 lines
No EOL
1.9 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
class LogListTile extends StatelessWidget {
|
|
final IconData icon;
|
|
final String title;
|
|
final String? subtitle;
|
|
final Widget? subtitleWidget;
|
|
final Widget? trailing;
|
|
|
|
const LogListTile({
|
|
Key? key,
|
|
required this.icon,
|
|
required this.title,
|
|
this.subtitle,
|
|
this.subtitleWidget,
|
|
this.trailing,
|
|
}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container(
|
|
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
Flexible(
|
|
child: Row(
|
|
children: [
|
|
Icon(
|
|
icon,
|
|
size: 24,
|
|
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
|
),
|
|
const SizedBox(width: 16),
|
|
Flexible(
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Text(
|
|
title,
|
|
style: TextStyle(
|
|
fontSize: 16,
|
|
fontWeight: FontWeight.w400,
|
|
color: Theme.of(context).colorScheme.onSurface
|
|
),
|
|
),
|
|
const SizedBox(height: 3),
|
|
subtitleWidget ?? Text(
|
|
subtitle!,
|
|
style: TextStyle(
|
|
fontSize: 14,
|
|
color: Theme.of(context).listTileTheme.textColor,
|
|
),
|
|
)
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
if (trailing != null) ...[
|
|
const SizedBox(width: 16),
|
|
trailing!
|
|
]
|
|
],
|
|
),
|
|
);
|
|
}
|
|
} |