A package for flip panel with built-in animation
Switch branches/tags
Nothing to show
Clone or download
Latest commit 607179d Nov 27, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
example release v0.0.9 Nov 27, 2018
lib release v0.0.9 Nov 27, 2018
screenshots Readme updated Nov 24, 2018
test update document Nov 15, 2018
.gitignore first commit Jun 19, 2018
.travis.yml update travis config Jun 21, 2018
CHANGELOG.md release v0.0.9 Nov 27, 2018
LICENSE first commit Jun 19, 2018
README.md fix bug (related to perspective transform) Jun 28, 2018
flip_panel.iml re-config to support Dart2 Aug 11, 2018
pubspec.lock formatted main.dart Nov 22, 2018
pubspec.yaml release v0.0.9 Nov 27, 2018

README.md

Flip Panel

pub package Build Status

A package for flip panel with built-in animation

How to use

import 'package:flip_panel/flip_panel.dart';

Create a flip panel from iterable source:

final digits = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];

FlipPanel.builder(
    itemBuilder: (context, index) => Container(
       color: Colors.black,
       padding: const EdgeInsets.symmetric(horizontal: 6.0),
       child: Text(
         '${digits[index]}',
         style: TextStyle(
             fontWeight: FontWeight.bold,
             fontSize: 50.0,
             color: Colors.white),
       ),
     ),
    itemsCount: digits.length,
    period: const Duration(milliseconds: 1000),
    loop: 1,
)

Create a flip panel from stream source:

FlipPanel<int>.stream(
      itemStream: Stream.periodic(Duration(milliseconds: 1000), (count) => count % 10),
      itemBuilder: (context, value) => Container(
        color: Colors.black,
        padding: const EdgeInsets.symmetric(horizontal: 6.0),
        child: Text(
          '$value',
          style: TextStyle(
            fontWeight: FontWeight.bold,
            fontSize: 50.0,
            color: Colors.white
          ),
        ),
      ),
      initValue: 0,
  );