Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/hnvn/flutter_flip_panel

A package for flip panel with built-in animation
https://github.com/hnvn/flutter_flip_panel

animation-3d dart flutter

Last synced: about 2 months ago
JSON representation

A package for flip panel with built-in animation

Lists

README

        

# Flip Panel

[![pub package](https://img.shields.io/pub/v/flip_panel.svg)](https://pub.dartlang.org/packages/flip_panel) ![](https://github.com/hnvn/flutter_flip_panel/workflows/unit%20test/badge.svg)

A package for flip panel with built-in animation




## How to use

````dart
import 'package:flip_panel/flip_panel.dart';
````

Create a flip panel from iterable source:

````dart
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:

````dart
FlipPanel.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,
);

````