# accordion library Null safety

Copyright 2021 Christian Gotschim.

Published under the new BSD license.

Simple to use accordion widget with lots of preset properties.

Use the `maxOpenSections` property to automatically close sections when opening a new section. This is especially helpful if you always want your list to look clean -- just set this parameter to 1 and whenever you open a new section the previous one closes.

`scrollIntoView` paramter can be set to `fast`, `slow`, or `none`. This parameter will only take affect if there are enough items in the list so scrolling is feasible.

Many parameters can be set globally on `Accordion` as well as individually on each `AccordionSection` (see list below).

The header consists of the left and right icons (right icon is preset to arrow down). Both can be set globally and individually. The headerText parameter is required and needs to be set for each `AccordionSection`.

The content area basically provides the container in which you drop whatever you want to display when `AccordionSection` opens. Background and borders can be set globally or individually per section.

    	Accordion(
    		maxOpenSections: 1,
    		headerTextStyle: TextStyle(color: Colors.white, fontSize: 17, fontWeight: FontWeight.bold),
    		leftIcon: Icon(Icons.audiotrack, color: Colors.white),
    		children: [
    			AccordionSection(
    				isOpen: true,
    				headerText: 'Introduction',
    				content: Icon(Icons.airplanemode_active, size: 200, color: Colors.amber),
    			),
    			AccordionSection(
    				isOpen: true,
    				headerText: 'About Us',
    				content: Icon(Icons.airline_seat_flat, size: 120, color: Colors.blue[200]),
    			),
    			AccordionSection(
    				isOpen: true,
    				headerText: 'Company Info',
    				content: Icon(Icons.airplay, size: 70, color: Colors.green[200]),
    			),
    		],
    	)

## Classes

Accordion
  The container list for all accordion sections. Usage: [...]
AccordionSection
  `AccordionSection` is one section within the `Accordion` widget. Usage: [...]
ListController
SectionController

## Mixins

CommonParams

## Properties

listCtrl → ListController
  final
springFast → SpringDescription
  final

## Enums

ScrollIntoViewOfItems