expandable_section 0.0.4 copy "expandable_section: ^0.0.4" to clipboard
expandable_section: ^0.0.4 copied to clipboard

Lightweight and customizable Flutter widget for smoothly animating the expansion and collapse of any child content vertically.

example/example.dart

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

class Example extends StatefulWidget {
  const Example({Key? key}) : super(key: key);

  @override
  State<Example> createState() => _ExampleState();
}

class _ExampleState extends State<Example> {
  bool _expand = false;
  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        GestureDetector(
          onTap: () {
            setState(() {
              _expand = !_expand;
            });
          },
          child: const Text(
            "Show more",
            style: TextStyle(
              color: Colors.black,
            ),
          ),
        ),
        const SizedBox(
          height: 10,
        ),
        ExpandableSection(
          expand: _expand,
          child: const Text("This is the expanded value..."),
        )
      ],
    );
  }
}
6
likes
140
points
63
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Lightweight and customizable Flutter widget for smoothly animating the expansion and collapse of any child content vertically.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on expandable_section