flip_panel 1.0.0

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,
  );

[1.0.0] - 2019-02-09

  • stop the clock when it reaches zero in countdown mode

[0.0.9] - 2018-11-27

  • add more UI implementation for FlipClock

[0.0.8] - 2018-10-20

  • Fix typo

[0.0.7] - 2018-10-19

  • Fix small analysis error.

[0.0.6] - 2018-10-19

  • add countdown clock

[0.0.5] - 2018-08-11

  • re-config to support Dart2

[0.0.4] - 2018-06-28

  • Fix bugs (temporarily get around the matter of perspective transform)

[0.0.3] - 2018-06-21

  • Fix bugs

[0.0.2] - 2018-06-20

  • Correct document

[0.0.1] - 2018-06-19

  • Initial release.

example/README.md

example_flip_panel #

A new Flutter application.

Getting Started #

For help getting started with Flutter, view our online documentation.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  flip_panel: ^1.0.0

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:flip_panel/flip_panel.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
83
Health:
Code health derived from static analysis. [more]
98
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
88
Overall:
Weighted score of the above. [more]
88
Learn more about scoring.

We analyzed this package on Jul 22, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.4.0
  • pana: 0.12.19
  • Flutter: 1.7.8+hotfix.3

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Fix lib/flip_panel.dart. (-1.99 points)

Analysis of lib/flip_panel.dart reported 4 hints:

line 17 col 29: Name non-constant identifiers using lowerCamelCase.

line 23 col 7: This class (or a class which this class inherits from) is marked as '@immutable', but one or more of its instance fields are not final: FlipClock._digitBuilder, FlipClock._separator, FlipClock.timeLeft

line 404 col 35: Name non-constant identifiers using lowerCamelCase.

line 409 col 37: Name non-constant identifiers using lowerCamelCase.

Maintenance suggestions

The package description is too short. (-12 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.20.1 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11
meta 1.1.6 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test

Admin