Files
prosappco/lib/components/general_checkbox.dart
2024-02-27 17:32:16 -05:00

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!);
},
);
}
}