Added theme modal

This commit is contained in:
Juan Gilsanz Polo 2022-09-27 15:43:52 +02:00
parent 91ec08614c
commit eace1767f0
13 changed files with 495 additions and 13 deletions

View 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!
],
),
),
),
);
}
}