Files
wehub-resource-sync bb087aad19
CI / format (push) Failing after 2s
CI / packaging (push) Failing after 0s
CI / test (push) Failing after 3s
chore: import upstream snapshot with attribution
2026-07-13 11:58:56 +08:00

39 lines
853 B
Dart

import 'package:flutter/material.dart';
class LabeledCheckbox extends StatelessWidget {
final String label;
final bool value;
final ValueChanged<bool?> onChanged;
final bool labelFirst;
const LabeledCheckbox({
required this.label,
required this.value,
required this.onChanged,
this.labelFirst = false,
});
@override
Widget build(BuildContext context) {
return Row(
children: labelFirst
? [
Text(label),
const SizedBox(width: 5),
Checkbox(
value: value,
onChanged: onChanged,
),
]
: [
Checkbox(
value: value,
onChanged: onChanged,
),
const SizedBox(width: 5),
Text(label),
],
);
}
}