GFAccordion class
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- GFAccordion
Constructors
- GFAccordion({Key? key, String? title, String? content, Widget? titleChild, Widget? contentChild, Color collapsedTitleBackgroundColor = GFColors.WHITE, Color expandedTitleBackgroundColor = const Color(0xFFE0E0E0), Widget collapsedIcon = const Icon(Icons.keyboard_arrow_down), Widget expandedIcon = const Icon(Icons.keyboard_arrow_up), TextStyle textStyle = const TextStyle(color: Colors.black, fontSize: 16), EdgeInsets titlePadding = const EdgeInsets.all(10), Color? contentBackgroundColor, EdgeInsets contentPadding = const EdgeInsets.all(10), Border titleBorder = const Border(), Border contentBorder = const Border(), EdgeInsets? margin, bool showAccordion = false, dynamic onToggleCollapsed(bool)?, BorderRadius titleBorderRadius = const BorderRadius.all(Radius.circular(0)), BorderRadius contentBorderRadius = const BorderRadius.all(Radius.circular(0))})
-
An accordion is used to show (and hide) content. Use
showAccordion
to hide & show the accordion content.const
Properties
- collapsedIcon → Widget
-
collapsedIcon of type Widget which is used to show when the GFAccordion is collapsed
final
- collapsedTitleBackgroundColor → Color
-
type of Color or GFColors which is used to change the background color of the GFAccordion title when it is collapsed
final
- content → String?
-
content of typeString which shows the messages after the GFAccordion is expanded
final
- contentBackgroundColor → Color?
-
type of Color or GFColors which is used to change the background color of the GFAccordion description
final
- contentBorder → Border
-
contentBorderColor of type Color or GFColors which is used to change the border color of content
final
- contentBorderRadius → BorderRadius
-
contentBorderRadius of type Radius which is used to change the border radius of content
final
- contentChild → Widget?
-
contentChild of type Widgetis alternative to content key. content will get priority over contentChild
final
- contentPadding → EdgeInsets
-
descriptionPadding of type EdgeInsets which is used to set the padding of the GFAccordion description
final
- expandedIcon → Widget
-
expandedIcon of typeWidget which is used when the GFAccordion is expanded
final
- expandedTitleBackgroundColor → Color
-
type of Color or GFColors which is used to change the background color of the GFAccordion title when it is expanded
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- margin → EdgeInsets?
-
margin of type EdgeInsets which is used to set the margin of the GFAccordion
final
- onToggleCollapsed → dynamic Function(bool)?
-
function called when the content body collapsed
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showAccordion → bool
-
controls if the accordion should be collapsed or not making it possible to be controlled from outside
final
- textStyle → TextStyle
-
textStyle of type textStyle will be applicable to text only and not for the child
final
- title → String?
-
text of type String is alternative to child. text will get priority over titleChild
final
- titleBorder → Border
-
titleBorderColor of type Color or GFColors which is used to change the border color of title
final
- titleBorderRadius → BorderRadius
-
titleBorderRadius of type Radius which is used to change the border radius of title
final
- titleChild → Widget?
-
child of type Widgetis alternative to title key. title will get priority over titleChild
final
- titlePadding → EdgeInsets
-
titlePadding of type EdgeInsets which is used to set the padding of the GFAccordion title
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → _GFAccordionState -
Creates the mutable state for this widget at a given location in the tree.
override
-
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