29 lines
576 B
Dart
29 lines
576 B
Dart
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!);
|
|
},
|
|
);
|
|
}
|
|
}
|