v2.0.1msh_checkbox
一個動畫復選框,受到 iOS 上 BEMCheckbox 的啟發,使用與 Flutter 自帶復選框類似的 API。
57喜歡 2000近 30 天下載150Pub 分數
AndroidiOSWebmacOSWindowsLinux
一個可自定義的圓形複選框,選取或取消選取時會播放動畫。
{"sdk":"flutter"}{"sdk":"flutter"}^2.0.0以下為英文專案原文快照,最新內容請造訪 GitHub。
pub package pub points popularity likes
A customizable circular checkbox which plays an animation when checked or unchecked. Inspired by BEMCheckbox for iOS.
Checkbox Examples
Choose from 4 animation/visual styles (stroke, scale in checkmark, scale in background, fade in).
Customize colors for active, inactive and disabled states.
Customize the animation duration.
Install the package:
flutter pub add msh_checkbox
class Example extends StatefulWidget {
Example({Key? key}): super(key: key);
@override
State<Example> createState() => _ExampleState();
}
class _ExampleState extends State<Example> {
bool isChecked = false;
@override
Widget build(BuildContext context) {
return Center(
child: MSHCheckbox(
size: 60,
value: isChecked,
colorConfig: MSHColorConfig.fromCheckedUncheckedDisabled(
checkedColor: Colors.blue,
),
style: MSHCheckboxStyle.stroke,
onChanged: (selected) {
setState(() {
isChecked = selected;
});
},
),
);
}
}
I know it's a small and simple widget, but if you'd like to support it is certainly appreciated!