|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:mohem_flutter_app/classes/colors.dart';
|
|
|
|
|
import 'package:mohem_flutter_app/extensions/int_extensions.dart';
|
|
|
|
|
import 'package:mohem_flutter_app/extensions/string_extensions.dart';
|
|
|
|
|
import 'package:mohem_flutter_app/extensions/int_extensions.dart';
|
|
|
|
|
|
|
|
|
|
class ShowRadio extends StatelessWidget {
|
|
|
|
|
String title, value, groupValue;
|
|
|
|
|
Color selectedColor;
|
|
|
|
|
|
|
|
|
|
ShowRadio({
|
|
|
|
|
required this.title,
|
|
|
|
|
required this.value,
|
|
|
|
|
required this.groupValue,
|
|
|
|
|
this.selectedColor = Colors.black,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
return Row(
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
children: [
|
|
|
|
|
Container(
|
|
|
|
|
width: 24,
|
|
|
|
|
height: 24,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Colors.transparent,
|
|
|
|
|
border: Border.all(color: MyColors.grey98Color, width: 0.5),
|
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(100)),
|
|
|
|
|
),
|
|
|
|
|
padding: EdgeInsets.all(4),
|
|
|
|
|
child: Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
height: double.infinity,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: value == groupValue ? selectedColor : Colors.transparent,
|
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(100)),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
12.width,
|
|
|
|
|
title.toText12(isBold: true)
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|