flare_checkbox 1.0.1+1

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 83

flare_checkbox #

pub package

Checkbox widget with two or three state animation with a Flare animation of your choice

Usage #

FlareCheckbox(
  animation: 'assets/checkbox.flr',
  value: true,
),

You can customize the widget with:

animation: path/name to your flare animation

animationOn: animation name of on state, default to On

animationOff: animation name of off state, default to Off

animationUnknown: animation name of unknown state, default to Unknown

value: null, false or true

width: force width of the animation

height: force height of the animation

tristate: true/false to enable null as an initial value

onChanged: callback whenever to checkbox change his state

if tristate is false and value is null, it will be set to false

How it works #

To make your flare animation compatible with this widget it's simple:

  • when value is true the animation On is called
  • when value is false the animation Off is called
  • when value is null and tristate true the animation Unknown is called

[1.0.1+] - 27/03/2019

  • fix snapToEnd when controlling checkbox by it's value and not by gesture

[1.0.1] - 23/03/2019

  • Use snapToEnd to prevent intro animation on widget creation

[1.0.0] - 23/03/2019

  • Add animations name customization

[0.0.1+2] - 27/02/2019

  • Add width and height field.

[0.0.1+1] - 26/02/2019

  • Readme documentation.

[0.0.1] - 26/02/2019

  • initial release.

example/README.md

import 'package:flare_checkbox/flare_checkbox.dart';
import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: FlareCheckbox(
          animation: 'assets/checkbox.flr',
          state: true,
        ),
      ), // This trailing comma makes auto-formatting nicer for build methods.
    );
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  flare_checkbox: ^1.0.1+1

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:flare_checkbox/flare_checkbox.dart';
  
Version Uploaded Documentation Archive
1.0.1+1 Mar 27, 2019 Go to the documentation of flare_checkbox 1.0.1+1 Download flare_checkbox 1.0.1+1 archive
1.0.1 Mar 26, 2019 Go to the documentation of flare_checkbox 1.0.1 Download flare_checkbox 1.0.1 archive
1.0.0 Mar 23, 2019 Go to the documentation of flare_checkbox 1.0.0 Download flare_checkbox 1.0.0 archive
0.0.1+2 Feb 27, 2019 Go to the documentation of flare_checkbox 0.0.1+2 Download flare_checkbox 0.0.1+2 archive
0.0.1+1 Feb 26, 2019 Go to the documentation of flare_checkbox 0.0.1+1 Download flare_checkbox 0.0.1+1 archive
0.0.1 Feb 26, 2019 Go to the documentation of flare_checkbox 0.0.1 Download flare_checkbox 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
69
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
95
Overall:
Weighted score of the above. [more]
83
Learn more about scoring.

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

  • Dart: 2.3.2
  • pana: 0.12.18
  • Flutter: 1.5.4-hotfix.2

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Format lib/flare_checkbox.dart.

Run flutter format to format lib/flare_checkbox.dart.

Maintenance issues and suggestions

Support latest dependencies. (-5 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flare_flutter ^1.3.5 1.5.2
flutter 0.0.0
Transitive dependencies
collection 1.14.11
flare_dart 1.4.2
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