Data Presentation
Accordion
A vertically stacked set of interactive headings that reveal associated content sections when clicked. Each section can be expanded or collapsed independently.
1@override2Widget build(BuildContext _) => FAccordion(3 children: const [4 FAccordionItem(5 title: Text('Production Information'),6 child: Text('''7Our flagship product combines cutting-edge technology with sleek design. Built with premium materials, it offers unparalleled performance and reliability.89Key features include advanced processing capabilities, and an intuitive user interface designed for both beginners and experts.10 '''),11 ),12 FAccordionItem(13 initiallyExpanded: true,14 title: Text('Shipping Details'),15 child: Text('''16We offer worldwide shipping through trusted courier partners. Standard delivery takes 3-5 business days, while express shipping ensures delivery within 1-2 business days.1718All orders are carefully packaged and fully insured. Track your shipment in real-time through our dedicated tracking portal.19 '''),20 ),21 FAccordionItem(22 title: Text('Return Policy'),23 child: Text('''24We stand behind our products with a comprehensive 30-day return policy. If you're not completely satisfied, simply return the item in its original condition.2526Our hassle-free return process includes free return shipping and full refunds processed within 48 hours of receiving the returned item.27 '''),28 ),29 ],30);31CLI
To generate and customize this style:
dart run forui style create accordionUsage
FAccordion(...)
1FAccordion(2 style: .delta(titlePadding: .zero),3 children: [FAccordionItem(title: Text('Title'), child: SizedBox())],4)FAccordionItem(...)
1FAccordionItem(2 style: const .delta(titlePadding: .zero),3 title: const Text('Title'),4 icon: const Icon(FIcons.chevronDown),5 initiallyExpanded: false,6 child: const Text('Content'),7)Examples
With Max Number of Expanded Items
1@override2Widget build(BuildContext _) => FAccordion(3 control: .managed(max: 2),4 children: const [5 FAccordionItem(6 title: Text('Production Information'),7 child: Text('''8Our flagship product combines cutting-edge technology with sleek design. Built with premium materials, it offers unparalleled performance and reliability.910Key features include advanced processing capabilities, and an intuitive user interface designed for both beginners and experts.11 '''),12 ),13 FAccordionItem(14 initiallyExpanded: true,15 title: Text('Shipping Details'),16 child: Text('''17We offer worldwide shipping through trusted courier partners. Standard delivery takes 3-5 business days, while express shipping ensures delivery within 1-2 business days.1819All orders are carefully packaged and fully insured. Track your shipment in real-time through our dedicated tracking portal.20 '''),21 ),22 FAccordionItem(23 title: Text('Return Policy'),24 child: Text('''25We stand behind our products with a comprehensive 30-day return policy. If you're not completely satisfied, simply return the item in its original condition.2627Our hassle-free return process includes free return shipping and full refunds processed within 48 hours of receiving the returned item.28 '''),29 ),30 ],31);32Time Picker
A time picker that allows a time to be selected. The picker supports arrow key navigation. Recommended for touch devices.
Avatar
A circular image component that displays user profile pictures with a fallback option. The Avatar component provides a consistent way to represent users in your application, displaying profile images with fallbacks to initials or icons when images are unavailable.