File tree Expand file tree Collapse file tree 3 files changed +11
-5
lines changed Expand file tree Collapse file tree 3 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -152,6 +152,7 @@ YYDialog YYListViewDialogListRadio() {
152152 items: radioItems,
153153 height: 370 ,
154154 intialValue: 2 ,
155+ color: Colors .white,
155156 activeColor: Colors .deepPurpleAccent,
156157 onClickItemListener: (index) {
157158 var radioItem = radioItems[index];
Original file line number Diff line number Diff line change @@ -205,6 +205,7 @@ class YYDialog {
205205 YYDialog listViewOfRadioButton ({
206206 List <RadioItem > items,
207207 double height,
208+ Color color,
208209 Color activeColor,
209210 int intialValue,
210211 Function (int ) onClickItemListener,
@@ -221,6 +222,7 @@ class YYDialog {
221222 child: YYRadioListTile (
222223 items: items,
223224 intialValue: intialValue,
225+ color: color,
224226 activeColor: activeColor,
225227 onChanged: onClickItemListener,
226228 ),
@@ -279,10 +281,11 @@ class YYDialog {
279281 padding: EdgeInsets .all (borderRadius / 3.14 ),
280282 width: width ?? null ,
281283 height: height ?? null ,
282- decoration: decoration ?? BoxDecoration (
283- borderRadius: BorderRadius .circular (borderRadius),
284- color: backgroundColor,
285- ),
284+ decoration: decoration ??
285+ BoxDecoration (
286+ borderRadius: BorderRadius .circular (borderRadius),
287+ color: backgroundColor,
288+ ),
286289 constraints: constraints ?? BoxConstraints (),
287290 child: CustomDialogChildren (
288291 widgetList: widgetList,
Original file line number Diff line number Diff line change @@ -8,12 +8,14 @@ class YYRadioListTile extends StatefulWidget {
88 Key key,
99 this .items,
1010 this .intialValue,
11+ this .color,
1112 this .activeColor,
1213 this .onChanged,
1314 }) : assert (items != null ),
1415 super (key: key);
1516
1617 final List <RadioItem > items;
18+ final Color color;
1719 final Color activeColor;
1820 final intialValue;
1921 final Function (int ) onChanged;
@@ -46,7 +48,7 @@ class YYRadioListTileState extends State<YYRadioListTile> {
4648 itemCount: widget.items.length,
4749 itemBuilder: (BuildContext context, int index) {
4850 return Material (
49- color: Colors .white ,
51+ color: widget.color ,
5052 child: RadioListTile (
5153 title: Text (widget.items[index].text),
5254 value: index,
You can’t perform that action at this time.
0 commit comments