EasyDropdownTile constructor
- Key? key,
- required String title,
- required VoidCallback? onPressed,
- EdgeInsets padding = const EdgeInsets.all(16),
- IconData? icon,
- String? subtitle,
- bool isSelected = false,
- Color? iconColor,
- double? iconSize,
- EdgeInsets iconPadding = const EdgeInsets.only(right: 16),
- TextStyle? titleStyle,
- TextAlign? titleAlignment,
- TextStyle? subtitleStyle,
- TextAlign? subtitleAlignment,
- IconData? selectedIcon,
- Color? selectedIconColor,
- double? selectedIconSize,
- EdgeInsets selectedIconPadding = const EdgeInsets.only(left: 16),
- Color? selectedBackgroundColor,
Creates an instance of EasyDropdownTile.
The title parameter is required and represents the main title of the tile.
The onPressed parameter is a callback that is invoked when the tile is
pressed.
The padding parameter controls the padding applied to the tile. Defaults
to EdgeInsets.all(16).
The icon parameter specifies an optional icon to display on the left
side of the tile.
The subtitle parameter allows you to provide an optional subtitle for
the tile.
The isSelected parameter indicates whether the tile is selected.
The iconColor parameter sets the color of the icon. Defaults to the theme's
onSurfaceVariant color.
The iconSize parameter specifies the size of the icon.
The iconPadding parameter controls the padding around the icon. Defaults
to EdgeInsets.only(right: 16).
The titleStyle parameter sets the style for the title text. Defaults to
the theme's large label style.
The titleAlignment parameter specifies the alignment of the title text.
Defaults to TextAlign.center.
The subtitleStyle parameter sets the style for the subtitle text. Defaults
to the theme's small label style.
The subtitleAlignment parameter specifies the alignment of the subtitle text.
Defaults to TextAlign.start.
The selectedIcon parameter allows you to specify an optional icon to display
on the right side of the tile when it is selected. Defaults to Icons.check_rounded.
The selectedIconColor parameter sets the color of the selected icon. Defaults
to the theme's onSurfaceVariant color.
The selectedIconSize parameter specifies the size of the selected icon.
The selectedIconPadding parameter controls the padding around the selected
icon. Defaults to EdgeInsets.only(left: 16).
The selectedBackgroundColor is the background color of the tile when it is selected.
Defaults to ThemeData.splashColor.
Implementation
const EasyDropdownTile({
super.key,
required this.title,
required this.onPressed,
this.padding = const EdgeInsets.all(16),
this.icon,
this.subtitle,
this.isSelected = false,
this.iconColor,
this.iconSize,
this.iconPadding = const EdgeInsets.only(right: 16),
this.titleStyle,
this.titleAlignment,
this.subtitleStyle,
this.subtitleAlignment,
this.selectedIcon,
this.selectedIconColor,
this.selectedIconSize,
this.selectedIconPadding = const EdgeInsets.only(left: 16),
this.selectedBackgroundColor,
});