mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-05-04 20:30:35 +00:00
Added theme modal
This commit is contained in:
parent
91ec08614c
commit
eace1767f0
13 changed files with 495 additions and 13 deletions
78
lib/screens/settings/custom_list_tile.dart
Normal file
78
lib/screens/settings/custom_list_tile.dart
Normal file
|
@ -0,0 +1,78 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
class CustomListTile extends StatelessWidget {
|
||||
final IconData? leadingIcon;
|
||||
final String label;
|
||||
final String? description;
|
||||
final Color? color;
|
||||
final void Function()? onTap;
|
||||
final Widget? trailing;
|
||||
final EdgeInsets? padding;
|
||||
|
||||
const CustomListTile({
|
||||
Key? key,
|
||||
this.leadingIcon,
|
||||
required this.label,
|
||||
this.description,
|
||||
this.color,
|
||||
this.onTap,
|
||||
this.trailing,
|
||||
this.padding
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Material(
|
||||
color: Colors.transparent,
|
||||
child: InkWell(
|
||||
onTap: onTap,
|
||||
child: Container(
|
||||
padding: padding ?? const EdgeInsets.symmetric(
|
||||
vertical: 10,
|
||||
horizontal: 25
|
||||
),
|
||||
width: double.maxFinite,
|
||||
child: Row(
|
||||
children: [
|
||||
if (leadingIcon != null) Row(
|
||||
children: [
|
||||
Icon(
|
||||
leadingIcon,
|
||||
color: color,
|
||||
),
|
||||
const SizedBox(width: 20),
|
||||
],
|
||||
),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
label,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
color: color
|
||||
),
|
||||
),
|
||||
if (description != null) Column(
|
||||
children: [
|
||||
const SizedBox(height: 5),
|
||||
Text(
|
||||
description!,
|
||||
style: TextStyle(
|
||||
color: color ?? Colors.grey
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
if (trailing != null) trailing!
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue