roundcheckbox 2.0.5 copy "roundcheckbox: ^2.0.5" to clipboard
roundcheckbox: ^2.0.5 copied to clipboard

Package to make easier the proccess of creating a round circle box. The component created is fully customizable to your needs.

example/lib/main.dart

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

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: CheckBox(),
    );
  }
}

class CheckBox extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Container(
        width: double.infinity,
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          crossAxisAlignment: CrossAxisAlignment.center,
          children: <Widget>[
            RoundCheckBox(
              onTap: (selected) {},
            ),
            const SizedBox(height: 12),
            RoundCheckBox(
              onTap: (selected) {},
              size: 60,
              uncheckedColor: Colors.yellow,
            ),
            const SizedBox(height: 12),
            RoundCheckBox(
              onTap: (selected) {},
              border: Border.all(
                width: 4,
                color: Colors.red,
              ),
              uncheckedColor: Colors.red,
              uncheckedWidget: Icon(Icons.close, color: Colors.white),
            ),
            const SizedBox(height: 12),
            RoundCheckBox(
              onTap: (selected) {},
              uncheckedWidget: Icon(Icons.close),
            ),
            const SizedBox(height: 12),
            RoundCheckBox(
              onTap: (selected) {},
              uncheckedWidget: Icon(Icons.close),
              animationDuration: Duration(
                milliseconds: 50,
              ),
            ),
            const SizedBox(height: 12),
            RoundCheckBox(
              onTap: (selected) {},
              checkedWidget: Icon(Icons.mood, color: Colors.white),
              uncheckedWidget: Icon(Icons.mood_bad),
              animationDuration: Duration(
                seconds: 1,
              ),
            ),
            const SizedBox(height: 12),
            RoundCheckBox(
              onTap: (selected) {},
              uncheckedWidget: Icon(Icons.close),
              isChecked: true,
            ),
            const SizedBox(height: 12),
            RoundCheckBox(
              onTap: (selected) => print(selected),
              uncheckedWidget: Icon(Icons.close),
              isChecked: true,
              size: 120,
            ),
            const SizedBox(height: 12),
            RoundCheckBox(
              onTap: null,
              uncheckedWidget: Icon(Icons.close),
              isChecked: true,
              size: 120,
            ),
            const SizedBox(height: 12),
            RoundCheckBox(
              onTap: null,
              uncheckedWidget: Icon(Icons.close),
              disabledColor: Colors.grey[300],
              isChecked: true,
              size: 48,
            ),
            const SizedBox(height: 12),
          ],
        ),
      ),
    );
  }
}
91
likes
130
pub points
96%
popularity

Publisher

verified publisherrodrigobastos.dev

Package to make easier the proccess of creating a round circle box. The component created is fully customizable to your needs.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

flutter

More

Packages that depend on roundcheckbox