GFAccordion constructor
const
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()?,
- 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.
Implementation
const GFAccordion(
{Key? key,
this.title,
this.content,
this.titleChild,
this.contentChild,
this.collapsedTitleBackgroundColor = GFColors.WHITE,
this.expandedTitleBackgroundColor = const Color(0xFFE0E0E0),
this.collapsedIcon = const Icon(Icons.keyboard_arrow_down),
this.expandedIcon = const Icon(Icons.keyboard_arrow_up),
this.textStyle = const TextStyle(color: Colors.black, fontSize: 16),
this.titlePadding = const EdgeInsets.all(10),
this.contentBackgroundColor,
this.contentPadding = const EdgeInsets.all(10),
this.titleBorder = const Border(),
this.contentBorder = const Border(),
this.margin,
this.showAccordion = false,
this.onToggleCollapsed,
this.titleBorderRadius = const BorderRadius.all(Radius.circular(0)),
this.contentBorderRadius = const BorderRadius.all(Radius.circular(0))})
: super(key: key);