SelectableContainer class

Box that can be tapped. When selected a check Icon appears

Inheritance

Constructors

SelectableContainer({required bool selected, Color? marginColor, Color? unselectedBackgroundColor, Color? selectedBackgroundColor, Color? unselectedBackgroundColorIcon, Color? selectedBackgroundColorIcon, Color? selectedBorderColor, Color? unselectedBorderColor, Color? selectedBorderColorIcon, Color? unselectedBorderColorIcon, @Deprecated('Use onValueChanged') Function? onPressed, required ValueChanged<bool> onValueChanged, int iconSize = 16, Color iconColor = Colors.white, IconData icon = Icons.check, IconData? unselectedIcon, Alignment iconAlignment = Alignment.topRight, int borderSize = 2, double selectedOpacity = 1.0, double unselectedOpacity = 0.5, int opacityAnimationDuration = 600, double padding = 0, double elevation = 0.0, double borderRadius = 10.0, double topMargin = 0.0, double bottomMargin = 0.0, double leftMargin = 0.0, double rightMargin = 0.0, double? topIconPosition, double? bottomIconPosition, double? leftIconPosition, double? rightIconPosition, required Widget? child})

Properties

borderRadius double
Default value : 10.0
final
borderSize int
Border size Default value : 2 pixels
final
bottomIconPosition double?
final
bottomMargin double
final
child Widget?
The child to render inside the container
final
elevation double
Elevation Default value : 0.0
final
hashCode int
The hash code for this object.
no setterinherited
icon IconData
Icon to be shown when selected. Default value : Icons.check
final
iconAlignment Alignment
Icon position. Default value : Alignment.topRight
final
iconColor Color
Icon's color Default value : white
final
iconSize int
Icon's size Default value : 16
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
leftIconPosition double?
final
leftMargin double
final
marginColor Color?
Background color for the space between the child and the Defaul value: scaffoldBackgroundColor
final
onPressed Function?
Callback when container get tapped
final
onValueChanged ValueChanged<bool>
Callback of type ValueChanged
final
opacityAnimationDuration int
Opacity animation duration in milliseconds. Default value : 600
final
padding double
Padding of child content Default value : 0.0
final
rightIconPosition double?
final
rightMargin double
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selected bool
Default not selected
final
selectedBackgroundColor Color?
Background color when container is selected. Default value : dialogBackgroundColor
final
selectedBackgroundColorIcon Color?
Background color of the icon when container is selected. Default value : theme.primaryColor
final
selectedBorderColor Color?
Border color when container is selected. Default value : primaryColor
final
selectedBorderColorIcon Color?
Border color of the icon when container is selected. Default value : Colors.white
final
selectedOpacity double
Opacity when container is selected. When not 1 it will be animated when tapped. Default value : 1
final
topIconPosition double?
final
topMargin double
final
unselectedBackgroundColor Color?
Background color when container is not selected. Default value : dialogBackgroundColor
final
unselectedBackgroundColorIcon Color?
Background color of the icon when container is not selected. Default value : theme.primaryColorDark
final
unselectedBorderColor Color?
Border color when container is not selected. Default value :primaryColorDark
final
unselectedBorderColorIcon Color?
Border color of the icon when container is not selected. Default value : Colors.white
final
unselectedIcon IconData?
Icon to be shown when unselected. Default value : geen
final
unselectedOpacity double
Opacity when container is not selected. When not 1 it will be animated when tapped. Default value : 0.5
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}) 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