Added show and hide top items

This commit is contained in:
Juan Gilsanz Polo 2024-02-07 19:46:35 +01:00
parent ed0bc65285
commit 3e152db6ac
7 changed files with 317 additions and 104 deletions

View file

@ -7,16 +7,18 @@ class CustomSwitchListTile extends StatelessWidget {
final String? subtitle;
final bool? disabled;
final EdgeInsets? padding;
final IconData? leadingIcon;
const CustomSwitchListTile({
Key? key,
super.key,
required this.value,
required this.onChanged,
required this.title,
this.disabled,
this.subtitle,
this.padding
}) : super(key: key);
this.padding,
this.leadingIcon,
});
@override
Widget build(BuildContext context) {
@ -33,6 +35,13 @@ class CustomSwitchListTile extends StatelessWidget {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
if (leadingIcon != null) ...[
Icon(
leadingIcon,
color: Theme.of(context).colorScheme.onSurfaceVariant,
),
const SizedBox(width: 16),
],
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,