Features

  • List sections with string title, actions and children
  • Optionally specify a title widget instead of a string

Usage

import 'package:flutter/material.dart';
import 'package:list_section/list_section.dart';

class ListSectionExample extends StatelessWidget {
  const ListSectionExample({super.key});

  @override
  Widget build(BuildContext context) => Scaffold(
    body: ListView(
      children: [
        ListSection(
            title: "Section Title",
            actions: [
              IconButton(onPressed: (){}, icon: Icon(Icons.add_rounded))
            ],
            children: [
              ListTile(
                  leading: Icon(Icons.ac_unit_rounded),
                  title: Text("Item 1"),
                  subtitle: Text("Subtitle 1")),
            ])
      ],
    ),
  );
}

Libraries

list_section