import 'package:flutter/material.dart'; class RadioItem extends StatelessWidget { const RadioItem({ Key key, this.onTap, @required this.title, @required this.value, @required this.groupValue, }): super(key: key); final GestureTapCallback onTap; final String title; final String value; final String groupValue; @override Widget build(BuildContext context) { return InkWell( onTap: onTap, child: Container( padding: const EdgeInsets.only(left: 15), constraints: BoxConstraints( maxHeight: double.infinity, minHeight: 50.0 ), width: double.infinity, decoration: BoxDecoration( color: Colors.white, border: Border( bottom: Divider.createBorderSide(context, width: 0.6), ) ), child: Row( children: [ Expanded( flex: 1, child: Padding( padding: const EdgeInsets.only(right: 5.0), child: Text(title), ), ), Radio( value: value, groupValue: groupValue, activeColor: Colors.red, // onChanged: (res){ // print("3333${res}"); // }, ) ], ), ), ); } }