FLUTTER ECOSYSTEM

kskdmn/checkbox_formfield

Flutter 包

checkbox_formfield 项目封面
Stars
3
Forks
9
最近推送(UTC)
2024年5月30日
项目状态
未归档
K GitHub avatar
GITHUB User

K ↗

Japanese person in China

China
语言DartKotlinSwiftObjective-C

使用的依赖

依赖清单 2 项
  • flutter{"sdk":"flutter"}
  • flutter_test开发依赖{"sdk":"flutter"}

原始 README

以下为英文项目原文快照,最新内容请访问 GitHub。

展开 / 收起项目 README

checkbox_formfield

pub package

A few kinds of checkbox that can be used as FormField

Getting Started

This library currently has two Widgets.

  • CheckboxListTileFormField: Use CheckboxListTile in Form
  • CheckboxIconFormField: Use two Icons as if they consist a checkbox and also in Form

Demo

Demo

Usage sample

Please check example/lib in this library.

Specifications

CheckboxListTileFormField
Parameter Description
key FormField.key
title CheckboxListTile.title
context Provide a default color to errorColor
onSaved FormField.onSaved
validator FormField.validator
initialValue FormField.initialValue
autovalidateMode FormField.autovalidateMode
enabled Whether the checkbox is enabled
dense CheckboxListTile.dense
errorColor Color of error message
Default: Theme.errorColor (context is given), Colors.red (otherwise)
activeColor CheckboxListTile.activeColor
checkColor CheckboxListTile.checkColor
controlAffinity CheckboxListTile.controlAffinity
secondary CheckboxListTile.secondary
contentPadding CheckboxListTile.contentPadding
autofocus CheckboxListTile.autofocus
CheckboxIconFormField
Parameter Description
key FormField.key
context Provide a default color to errorColor
onSaved FormField.onSaved
initialValue FormField.initialValue
autovalidateMode FormField.autovalidateMode
enabled Whether the checkbox is enabled
trueIcon IconData if true
Default: Icons.check
falseIcon IconData if false
Default: Icons.check_box_outline_blank
trueIconColor Color if true
Default: Theme.colorScheme.secondary (if context is given), Theme.iconTheme.color (otherwise)
falseIconColor Color if false
Default: Theme.iconTheme.color
disabledColor Color if disabled
Default: Theme.disabledColor
padding padding
Default: 24.0
iconSize Icon.size