expansion_tile_list 0.0.1 copy "expansion_tile_list: ^0.0.1" to clipboard
expansion_tile_list: ^0.0.1 copied to clipboard

An expansion tile list serves as a container for ExpansionTile widget. An idea from ExpansionPanelList. This package tries to solve some simple drawback that ExpansionTile may have and simplify the e [...]

Expansion Tile List #

This project is a Flutter package that provides an container to the ExpansionTile widget.

Description #

The ExpansionTileList serves as a container for ExpansionTile widgets. It provides an easy way to create a list of items that can be expanded or collapsed to show or hide additional information.

Features #

  • The builder property allows the customization of the creation of each tile in the ExpansionTileList.
  • The tileGapSize property allows you to specify the size of the gap between each tile in the ExpansionTileList.
  • Expand at most one Tile at a time.
  • Extension of ExpansionTile class with a copyWith method.

Installation #

To use this package, add expansion_tile_list as a dependency in your pubspec.yaml file.

dependencies:
  flutter:
    sdk: flutter
  expansion_tile_list: ^0.0.1

Usage #

Import the package:

import 'package:expansion_tile_list/expansion_tile_list.dart';

Example #

Here's a simple example of how to use the ExpansionTileList:

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

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: ExpansionTileList(
          title: Text('Expansion Tile'),
          children: <Widget>[
            ExpansionTile(
              title: Text('Header 1'),
              children: <Widget>[
                Text('Child 1'),
              ],
            ),
            ExpansionTile(
              title: Text('Header 2'),
              children: <Widget>[
                Text('Child 2'),
              ],
            ),
          ],
        ),
      ),
    );
  }
}

In this example, we created a simple ExpansionTileList with two children.

Testing #

This package includes thorough unit tests for the ExpansionTileExtension. To run the tests, use the following command:

flutter test

Contributing #

Contributions are welcome! If you find a bug or want a feature, please fill an issue. If you want to contribute code, please submit a pull request.

License #

This project is licensed under the BSD-style license. See the LICENSE file for details.

35
likes
0
points
2.24k
downloads

Publisher

verified publishermonohaus.com

Weekly Downloads

An expansion tile list serves as a container for ExpansionTile widget. An idea from ExpansionPanelList. This package tries to solve some simple drawback that ExpansionTile may have and simplify the expansion and collapse action of ExpansionTile.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on expansion_tile_list