AccordionSection(- {UniqueKey? key,
- int index = 0,
- bool isOpen = false,
- required Widget content,
- Widget? leftIcon,
- Widget? rightIcon,
- bool? flipRightIconIfOpen = true,
- Color? contentBackgroundColor,
- Color? contentBorderColor,
- double? contentBorderWidth,
- double? contentBorderRadius,
- double? contentHorizontalPadding,
- double? contentVerticalPadding,
- double? paddingBetweenOpenSections,
- double? paddingBetweenClosedSections,
- ScrollIntoViewOfItems? scrollIntoViewOfItems}
)
Implementation
AccordionSection({
this.key,
this.index = 0,
bool isOpen = false,
required this.headerText,
required this.content,
Color? headerBackgroundColor,
double? headerBorderRadius,
TextAlign? headerTextAlign,
TextStyle? headerTextStyle,
EdgeInsets? headerPadding,
Widget? leftIcon,
Widget? rightIcon,
bool? flipRightIconIfOpen = true,
Color? contentBackgroundColor,
Color? contentBorderColor,
double? contentBorderWidth,
double? contentBorderRadius,
double? contentHorizontalPadding,
double? contentVerticalPadding,
double? paddingBetweenOpenSections,
double? paddingBetweenClosedSections,
ScrollIntoViewOfItems? scrollIntoViewOfItems,
}) {
_sectionCtrl = SectionController();
_sectionCtrl.isSectionOpen.value = isOpen;
this._headerBackgroundColor = headerBackgroundColor;
this._headerBorderRadius = headerBorderRadius;
this._headerTextAlign = headerTextAlign;
this._headerTextStyle = headerTextStyle;
this._headerPadding = headerPadding;
this._leftIcon = leftIcon;
this._rightIcon = rightIcon;
this._flipRightIconIfOpen = flipRightIconIfOpen ?? true;
this._contentBackgroundColor = contentBackgroundColor;
this._contentBorderColor = contentBorderColor;
this._contentBorderWidth = contentBorderWidth;
this._contentBorderRadius = contentBorderRadius;
this._contentHorizontalPadding = contentHorizontalPadding ?? 10;
this._contentVerticalPadding = contentVerticalPadding ?? 10;
this._paddingBetweenOpenSections = paddingBetweenOpenSections;
this._paddingBetweenClosedSections = paddingBetweenClosedSections;
this._scrollIntoViewOfItems = scrollIntoViewOfItems ?? ScrollIntoViewOfItems.fast;
}