FLUTTER ECOSYSTEM

zfnadia/grouped-checkbox

Flutter 프로젝트에서 다양한 스타일로 체크박스를 쉽게 그룹화할 수 있는 플러터 패키지입니다.

그룹화된 체크박스 프로젝트 이미지
Stars
7
Forks
8
최근 푸시(UTC)
2024. 1. 9.
프로젝트 상태
활성
Nadia Ferdoush GitHub avatar
GITHUB User

Nadia Ferdoush ↗

Hakuna Matata

Toronto, Ontario
언어DartSwiftDockerfileKotlinObjective-C

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 2 개
  • flutter{"sdk":"flutter"}
  • flutter_test개발 의존성{"sdk":"flutter"}

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

README 펼치기 / 접기

Grouped Checkbox Widget for Flutter

pub package

Overview

The GroupedCheckbox widget enables displaying a list of checkboxes in various orientations and styles. It's designed for flexibility, supporting generic types, and offers customizable options.

Features

  • Supports generic data types.
  • Vertical, horizontal, and wrap orientations.
  • Disabled state support.
  • Callbacks for state changes.

Installation

Add grouped_checkbox to your Flutter project's dependencies.

https://raw.githubusercontent.com/zfnadia/grouped-checkbox/master/screenshots/one.jpg https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExMHE3dTJxeTY4MjFyOWNxODYxazZoYzBueGJsNWVqbXk0Yjlicmd0aSZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/rCxjnhgA34BFo76lxt/giphy.gif

Usage

To use this plugin, add grouped_checkbox as a dependency in your pubspec.yaml file.

dependencies: grouped_checkbox: 2.0.0
Example
import 'package:grouped_checkbox/grouped_checkbox.dart';
    final List<ColorItem> allItemList = [
      ColorItem('Red', Colors.red), 
      ColorItem('Green', Colors.green), 
      ColorItem('Blue', Colors.blue),
      ColorItem('Yellow', Colors.yellow),
      ColorItem('Black', Colors.black),
      ColorItem('Violet', Colors.purple)
    ];

    class ColorItem {
      String name;
      Color color;
    
      ColorItem(this.name, this.color);
    }

    GroupedCheckbox<ColorItem>(
      itemList: allItemList,
      checkedItemList: selectedItems,
      disabled: disabledItems,
      onChanged: (itemList) {
        updateFunction(itemList!);
      },
      orientation: orientation,
      checkColor: Colors.purpleAccent,
      activeColor: Colors.lightBlue,
      itemWidgetBuilder: (item) => Text(item.name, style: TextStyle(color: item.color)),
    )