๐ฆ multi_expansion_card
A customizable Flutter widget that allows multiple expansion tiles/cards with flexible control over expansion states. Ideal for building collapsible lists or accordions with enhanced UI and better user experience.
![preview gif or screenshot here if available]
โจ Features
- Expand/collapse multiple cards independently
- Smooth animations
- Customize card title, content, and style
- Easy to integrate and use
๐ Installation
Add this to your pubspec.yaml
:
dependencies:
multi_expansion_card: ^0.0.1
Then run:
flutter pub get
๐ก Usage
import 'package:multi_expansion_card/multi_expansion_card.dart';
class ExamplePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text('Multi Expansion Cards')),
body: ListView(
children: [
MultiExpansionCard(
title: Text("Card 1"),
children: [
ListTile(title: Text("Content for Card 1")),
],
),
MultiExpansionCard(
title: Text("Card 2"),
children: [
ListTile(title: Text("Content for Card 2")),
],
),
],
),
);
}
}
๐ Example
For a complete working example, see the example/
directory in this repo.
๐งช Running Tests
flutter test
๐ ๏ธ Contributing
Contributions, issues, and feature requests are welcome! Feel free to check issues page or submit a pull request.
๐ Support
If you find this package useful, please consider supporting development by buying me a coffee:
๐ License
This project is licensed under the MIT License.
MIT License
Copyright (c) 2024 Adeeb Anvar
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.