selectable_icon 1.0.4 copy "selectable_icon: ^1.0.4" to clipboard
selectable_icon: ^1.0.4 copied to clipboard

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

Selectable Box #

GitHub stars pub package

Use SelectableIcon to create a selectable box in your flutter app, SelectableIcon comes with a lot of customization options mentioned below. Convert any widget into a selectable box.

Screenshot

Installation #

Add selectable_icon: ^1.0.4 in your project's pubspec.yaml:

dependencies:
  selectable_icon: ^1.0.4

Usage #

Import selectable_icon in your dart file:

import 'package:selectable_icon/selectable_icon.dart';

Then use SelectableIcon in your widget tree:

bool isSelected = false;
int count = 0;

SelectableIcon(
  onTap: () {
    setState(() {
      isSelected = !isSelected;
      if (isSelected) {
        count++;
      } else {
        count--;
      }
    });
  },
  isSelected: isSelected,
  selectedIcon: Icons.thumb_up,
  unSelectedIcon: Icons.thumb_up,
  size: 70,
  selectedColor: Colors.blue,
  unSelectedColor: Colors.grey,
  count: count,
  showCount: true,
  animationDuration: const Duration(milliseconds: 500),
  padding: const EdgeInsets.all(10),
),
5
likes
160
pub points
0%
popularity

Publisher

verified publishermantreshkhurana.com

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

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on selectable_icon