FLUTTER ECOSYSTEM

HornMichaelS/msh_checkbox

Uma caixa de seleção circular personalizável que reproduz uma animação ao ser marcada ou desmarcada.

Capa do projeto msh_checkbox
Stars
7
Forks
6
Último push (UTC)
10 de jun. de 2023
Status do projeto
Ativo
Michael GitHub avatar
GITHUB User

Michael ↗

Mobile Engineering Tech Lead at Autopilot Holdings Corp.

Los Angeles, California
LinguagensDartC++CMakeHTMLCSwiftKotlinObjective-C

Pacotes publicados por este repositório

Dependências usadas

Lista de dependências 3 itens
  • flutter{"sdk":"flutter"}
  • flutter_testDesenvolvimento{"sdk":"flutter"}
  • flutter_lintsDesenvolvimento^2.0.0

README original

Texto original em inglês. Visite o GitHub para a versão atual.

Expandir / recolher README

msh_checkbox

pub package pub points popularity likes

A customizable circular checkbox which plays an animation when checked or unchecked. Inspired by BEMCheckbox for iOS.

Checkbox Examples

Features

  • Choose from 4 animation/visual styles (stroke, scale in checkmark, scale in background, fade in).

  • Customize colors for active, inactive and disabled states.

  • Customize the animation duration.

Getting started

Install the package:

flutter pub add msh_checkbox

Usage

class Example extends StatefulWidget {
  Example({Key? key}): super(key: key);

  @override
  State<Example> createState() => _ExampleState();
}

class _ExampleState extends State<Example> {
  bool isChecked = false;

  @override
  Widget build(BuildContext context) {
    return Center(
      child: MSHCheckbox(
        size: 60,
        value: isChecked,
        colorConfig: MSHColorConfig.fromCheckedUncheckedDisabled(
          checkedColor: Colors.blue,
        ),
        style: MSHCheckboxStyle.stroke,
        onChanged: (selected) {
          setState(() {
            isChecked = selected;
          });
        },
      ),
    );
  }
}

Support

I know it's a small and simple widget, but if you'd like to support it is certainly appreciated!

Buy Me A Coffee