Simple FoldingCell widget

Simple folding cell widget implemented in Flutter. Its a widget so add it to any container widget as a child.

pub package

Installation

Add dependency in pubspec.yaml:

dependencies:
  folding_cell: "^0.1.0"

Import in your project:

import 'package:folding_cell/folding_cell.dart';

Basic usage

class FoldingCellSimpleDemo extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Container(
      color: Color(0xFF2e282a),
      alignment: Alignment.topCenter,
      child: SimpleFoldingCell(
        frontWidget: Container(
            color: Color(0xFFffcd3c),
            alignment: Alignment.center,
            child: Text("CARD",
                style: TextStyle(
                    color: Color(0xFF2e282a), fontFamily: 'OpenSans', fontSize: 20.0, fontWeight: FontWeight.w800))),
        innerTopWidget: Container(
            color: Color(0xFFff9234),
            alignment: Alignment.center,
            child: Text("TITLE",
                style: TextStyle(
                    color: Color(0xFF2e282a), fontFamily: 'OpenSans', fontSize: 20.0, fontWeight: FontWeight.w800))),
        innerBottomWidget: Container(
          color: Color(0xFFecf2f9),
          alignment: Alignment.bottomCenter,
          child: Padding(
            padding: EdgeInsets.only(bottom: 10),
            child: FlatButton(onPressed: (){
              final snackBar = SnackBar(content: Text('Item clicked'), duration: Duration(milliseconds: 600),);
              Scaffold.of(context).showSnackBar(snackBar);
            }, child: Text("FoldingCell Demo",), textColor: Colors.white, color: Colors.indigoAccent, splashColor: Colors.white.withOpacity(0.5),),
          ),
        ),
        cellSize: Size(MediaQuery.of(context).size.width, 125),
        padding: EdgeInsets.all(15),
      ),
    );
  }
}

Examples

example project contains these two demos

Demo 1 - FoldingCell inside Container

alt tag

Demo 2 - FoldingCell inside ListView

alt tag

Bugs/Requests

Reporting issues and requests for new features are always welcome.

Buy Me A Coffee

Libraries

folding_cell
widget

Dart

dart:ui
Built-in types and core primitives for a Flutter application. [...]

Core

dart:async
Support for asynchronous programming, with classes such as Future and Stream. [...]
dart:collection
Classes and utilities that supplement the collection support in dart:core. [...]
dart:convert
Encoders and decoders for converting between different data representations, including JSON and UTF-8. [...]
dart:core
Built-in types, collections, and other core functionality for every Dart program. [...]
dart:developer
Interact with developer tools such as the debugger and inspector. [...]
dart:math
Mathematical constants and functions, plus a random number generator. [...]
dart:typed_data
Lists that efficiently handle fixed sized data (for example, unsigned 8 byte integers) and SIMD numeric types. [...]

VM

dart:io
File, socket, HTTP, and other I/O support for non-web applications. [...]
dart:isolate
Concurrent programming using isolates: independent workers that are similar to threads but don't share memory, communicating only via messages. [...]