EasyDropdownTile class
A widget representing a tile within an EasyDropdown.
An EasyDropdownTile is typically used to display a selectable item within a dropdown list. It provides customization options for the tile's appearance, including its title, subtitle, icon, and selected state.
Example usage:
EasyDropdownTile(
title: 'Option 1',
subtitle: 'Description for Option 1',
icon: Icons.star,
isSelected: true,
onPressed: () {
// Callback when the tile is pressed.
},
)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- EasyDropdownTile
Constructors
- EasyDropdownTile({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.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- icon → IconData?
-
An optional icon to display on the left side of the tile.
final
- iconColor → Color?
-
The color of the icon. Defaults to the theme's
onSurfaceVariantcolor.final - iconPadding → EdgeInsets
-
The padding around the icon. Defaults to
EdgeInsets.only(right: 16).final - iconSize → double?
-
The size of the icon.
final
- isSelected → bool
-
Indicates whether the tile is selected.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- onPressed → VoidCallback?
-
A callback that is invoked when the tile is pressed.
final
- padding → EdgeInsets
-
The padding parameter controls the padding applied to the tile. Defaults
to
EdgeInsets.all(16).final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectedBackgroundColor → Color?
-
The selectedBackgroundColor is the background color of the tile when it is selected.
Defaults to ThemeData.splashColor.
final
- selectedIcon → IconData?
-
An optional icon to display on the right side of the tile when it is selected.
final
- selectedIconColor → Color?
-
The color of the selected icon. Defaults to the theme's
onSurfaceVariantcolor.final - selectedIconPadding → EdgeInsets
-
The padding around the selected icon. Defaults to
EdgeInsets.only(left: 16).final - selectedIconSize → double?
-
The size of the selected icon. Defaults to 22.
final
- subtitle → String?
-
An optional subtitle for the tile.
final
- subtitleAlignment → TextAlign?
-
The alignment of the subtitle text. Defaults to TextAlign.start.
final
- subtitleStyle → TextStyle?
-
The style for the subtitle text. Defaults to the theme's small label style.
final
- title → String
-
The main title of the tile.
final
- titleAlignment → TextAlign?
-
The alignment of the title text. Defaults to TextAlign.center.
final
- titleStyle → TextStyle?
-
The style for the title text. Defaults to the theme's large label style.
final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited