selectable_box 1.0.3 copy "selectable_box: ^1.0.3" to clipboard
selectable_box: ^1.0.3 copied to clipboard

A flutter package that will allow you to create a selectable box with multiple customizations.

Selectable Box #

GitHub stars pub package

Use SelectableBox to create a selectable box in your flutter app.

Screenshot

Installation #

Add selectable_box: ^1.0.3 in your project's pubspec.yaml:

dependencies:
  selectable_box: ^1.0.3

Usage #

Import selectable_box in your dart file:

import 'package:selectable_box/selectable_box.dart';

Then use SelectableBox in your widget tree:

bool isSelected = false;

SelectableBox(
  height: 250,
  width: 400,
  color: Colors.white,
  isSelectedColor: Colors.white,
  borderColor: Colors.grey,
  isSelectedBorderColor: Colors.blue,
  borderWidth: 1,
  borderRadius: 20,
  padding: const EdgeInsets.all(8),
  animationDuration: const Duration(milliseconds: 200),
  opacity: 0.5,
  isSelectedOpacity: 1,
  checkboxAlignment: Alignment.topRight,
  checkboxPadding: const EdgeInsets.all(0),
  selectedIcon: const Icon(
    Icons.check_circle,
    color: Colors.green,
  ),
  unselectdIcon: const Icon(
    Icons.check_circle_outline,
    color: Colors.grey,
  ),
  showCheckbox: true,
  onTap: () {
    setState(() {
      isSelected = !isSelected;
    });
  },
  isSelected: isSelected,
  child: const Image(
    image: AssetImage('assets/images/1.jpg'),
    fit: BoxFit.cover,
  ),
),
18
likes
0
pub points
68%
popularity

Publisher

verified publishermantreshkhurana.com

A flutter package that will allow you to create a selectable box with multiple customizations.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

figma_squircle, flutter

More

Packages that depend on selectable_box