33 lines
765 B
Dart
33 lines
765 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:match_magic/styles/styles.dart';
|
|
|
|
class RadioButton<T> extends StatelessWidget {
|
|
final T value;
|
|
final T? groupValue;
|
|
final ValueChanged<T?>? onChanged;
|
|
|
|
const RadioButton({
|
|
required this.value,
|
|
required this.groupValue,
|
|
required this.onChanged,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Row(
|
|
children: [
|
|
Radio<T>(
|
|
value: value,
|
|
groupValue: groupValue,
|
|
onChanged: onChanged,
|
|
activeColor: AppStyles.accentColor,
|
|
visualDensity: const VisualDensity(
|
|
horizontal: VisualDensity.minimumDensity,
|
|
vertical: VisualDensity.minimumDensity,
|
|
),
|
|
),
|
|
],
|
|
);
|
|
}
|
|
}
|