comp
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class GeneralCheckbox extends StatelessWidget {
|
||||
final String text;
|
||||
final bool initialValue;
|
||||
final Function(bool) onChanged;
|
||||
|
||||
const GeneralCheckbox({
|
||||
super.key,
|
||||
required this.text,
|
||||
required this.initialValue,
|
||||
required this.onChanged,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return CheckboxListTile(
|
||||
title: Text(
|
||||
text,
|
||||
style: const TextStyle(fontSize: 15),
|
||||
),
|
||||
value: initialValue,
|
||||
onChanged: (value) {
|
||||
onChanged(value!);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user