Files
prosappco/lib/src/presentation/widgets/shared/primary_checkbox.dart
T
2023-11-10 15:34:13 -05:00

29 lines
593 B
Dart

import 'package:flutter/material.dart';
class PrimaryCheckbox extends StatelessWidget {
final String text;
final bool initialValue;
final Function(bool) onChanged;
const PrimaryCheckbox({
Key? key,
required this.text,
required this.initialValue,
required this.onChanged,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return CheckboxListTile(
title: Text(
text,
style: const TextStyle(fontSize: 15),
),
value: initialValue,
onChanged: (value) {
onChanged(value!);
},
);
}
}