folding_cell
1.0.2, released 6 years ago by an unverified publisher
A widget that folds/unfolds a cell with front and inner content
WASM-ready
What it does
The SimpleFoldingCell widget lets you display a front widget that can be tapped to reveal an inner widget with a folding animation. It exposes callbacks for open/close and allows programmatic control via a GlobalKey.
AI-written summary of version 1.0.2, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need a card-like UI that expands/collapses with a folding effect
- You want a lightweight, customizable folding cell without external dependencies
Skip it when
- You require complex animation sequences beyond a simple fold
- You need a fully featured accordion or expandable list with many items
Strengths
- Simple API, no external dependencies
- Customizable size, padding, duration, and border radius
- Provides open/close callbacks and programmatic toggle
Weaknesses
- Limited to a single cell, not a list widget
- Animation options are basic (only duration and curve)
- No support for nested folding cells or complex state management
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
import 'package:folding_cell/folding_cell.dart';
final _key = GlobalKey<SimpleFoldingCellState>();
SimpleFoldingCell.create(
key: _key,
frontWidget: Container(color: Colors.yellow, child: Text('Front')),
innerWidget: Container(color: Colors.blue, child: Text('Inner')),
cellSize: Size(MediaQuery.of(context).size.width, 140),
animationDuration: Duration(milliseconds: 300),
);