Reboot v3

This commit is contained in:
Alessandro Autiero
2023-05-24 23:19:36 +02:00
parent 760e336bc0
commit eb6381912c
129 changed files with 396379 additions and 1380 deletions

View File

@@ -0,0 +1,27 @@
import 'package:fluent_ui/fluent_ui.dart';
class SmartCheckBox extends StatefulWidget {
final CheckboxController controller;
final Widget? content;
const SmartCheckBox({Key? key, required this.controller, this.content}) : super(key: key);
@override
State<SmartCheckBox> createState() => _SmartCheckBoxState();
}
class _SmartCheckBoxState extends State<SmartCheckBox> {
@override
Widget build(BuildContext context) {
return Checkbox(
checked: widget.controller.value,
onChanged: (checked) => setState(() => widget.controller.value = checked ?? false),
content: widget.content
);
}
}
class CheckboxController {
bool value;
CheckboxController({this.value = false});
}